简体   繁体   中英

Deep linking(Universal links) in iOS 9

As we all know that iOS deep linking has changed a bit called universal link, with universal link we need to Enable 'Associated Domains' in your Xcode project and add the supported domains there, and few more changes like hosting the apple-app-site-association JSON on the domain server.

This I understood very well, but my problem here is I have to support multiple communities may be like each and every enterprise using app will be having there own community, so it is not good thing to add all the communities(domains) to 'Associated Domains' and if any new enterprise uses the app, then I need to give a app update adding that domain details.

Can anyone help me on this?

I have couple of questions

  1. Can we disable this universal linking and use previous deep linking itself.
  2. If I have to support multiple domains say around some thousand domains, how can I make use of universal linking.

Thanks, Vinodh

Regarding your first question: You can continue using the old-style deep linking without any problems or changes to your app.

Example of old-style deep linking:

Add the following to the <head> of your website:

<script>
  window.onload = function() {
    if(navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
      // replace the following with the actual deep link of your app
      window.location = "myapp://deep/link";
      setTimeout(function() {
        // replace the following with the actual app store link of your app
        window.location = "http://itunes.apple.com/app/id123456?mt=8";
      }, 500);
    }
  }
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM