nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 529 forks source link

Plugin does not handle www.domain.com? [iOS] #64

Closed jusdeleon closed 8 years ago

jusdeleon commented 8 years ago

I'm testing using slack and when i click on domain.com/path, it gets handled. If I click on www.domain.com/path, it does not open in the app. Any help would be appreciated. Thanks!

nikDemyankov commented 8 years ago

Depends on how you defined it in config.xml and in apple-app-site-association-file. If app is not launched from www.domain.com/path - most likely you specified it in configs without www.

jusdeleon commented 8 years ago

So if I have this block of host,

        <host name="hostname.com">
          ...
        </host>

I'll have to define another block for supporting www?

        <host name="www.hostname.com">
          ...
        </host>

If this is the case, how would the site handle two apple-app-association-files?

nikDemyankov commented 8 years ago

I'll have to define another block for supporting www?

Yes.

how would the site handle two apple-app-association-files?

Hard to say. I'm afraid you will have to experiment with it. I think iOS just takes the domain and appends apple-app-site-association to it and tries to download it from the server. If it fails - it opens browser. If it has some redirects - it also fails.

jusdeleon commented 8 years ago

Looks like both is being picked off by the plugin. Defined two hosts and uploaded only one association file since it contains the same contents anyway. Thank you very much.

nikDemyankov commented 8 years ago

Great!