How to redirect the user to a mobile app or a website on click of a hyperlink sent in an email? Should it need to be handled on server-side using PHP?

前端 未结 5 1418
臣服心动
臣服心动 2020-12-31 19:04

I\'ve a website which is already developed using PHPFox and it\'s working fine. Now, iOS development team has created a mobile app in iOS for the same funct

5条回答
  •  -上瘾入骨i
    2020-12-31 19:51

    You (or your iOS-team) need to add an URL scheme to the iOS app to make deep linking possible. Then you need a website which checks if this URL scheme (and therefore the iOS app) is available on the device. If yes, then you forward to the app, if no you forward to the website. Then you embed the link to the check website in your emails.

    There are services, which can help you with the whole setup. One I know is https://branch.io but I'm sure there are more out there.

    Edit:

    Deep Linking in iOS: http://blog.originate.com/blog/2014/04/22/deeplinking-in-ios/

    From that link: "To enable deep linking, go to the Info tab in the Xcode project. In the URL Types section, click on the + button, and then add an identifier and a URL scheme. Ensure that the identifier and URL scheme you select are unique. Take note of the URL scheme you enter, as this is how iOS knows to open a link in your app."

    There are more steps to follow, so make sure to read the whole thing.

    Create a link for iOS and Web:

    Create a link that either launches iOS app, or redirects to app store

    and

    Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

    instead of redirecting to the AppStore, you'd like to redirect to your webpage.

提交回复
热议问题