问题
I need to make my users to click on email URL to open my App. I having some daily updates that I have forward to my Users. I am having some URL links in that email. I just need to make my users to open app when they clicking those email links.
Email URL Here: http://kavin.com/login?redirect_to=calendar?cal_navigation=2017-03-23
回答1:
use the call back method for handle the referral source
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
print("source application:\(sourceApplication)")
let value: String = url.absoluteString as String
print("value :\(value)")
print("scheme: \(url.scheme)")
print("query: \(url.query)")
return true
}
回答2:
Check this link to support Universal Link
https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
When you support universal links, iOS users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari.
来源:https://stackoverflow.com/questions/43177383/ios-swift-email-deep-linking