iOS Swift Email Deep Linking

北城余情 提交于 2019-12-12 14:37:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!