Reputation: 896
After installing the app manually from xCode (with the device plugged to the MacBook) I can click mails with a link to the Web App and it opens it into the cordova app instead of the web app (as expected).
But when I download and install the app from AppStore or testFlight (with the exact same code base), Universal Links are ignored and the Web App is opened.
When I monitor Apache logs, and installing the app manually, I get :
XX.XX.XX.XX - - [29/Aug/2018:14:32:33 +0000] "GET /.well-known/apple-app-site-association HTTP/1.1" 200 730 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
But while installing the app from testFlight or the AppStore, there is no request for that file.
Can someone help me to find even a clue to search for... How can I enabled UniversalLink for my production app?
I unzipped the IPA generated, openned the embedded.mobileprovision and I had:
<key>Entitlements</key>
<dict>
<key>keychain-access-groups</key>
<array>
<string>XXXX.*</string>
</array>
<key>get-task-allow</key>
<true/>
<key>application-identifier</key>
<string>XXXX.my.domain.com</string>
<key>com.apple.developer.associated-domains</key>
<string>*</string>
<key>com.apple.developer.team-identifier</key>
<string>XXXX</string>
<key>aps-environment</key>
<string>development</string>
</dict>
Associated domains are enabled but shouldn't they have an array of string with all my applinks:domains
?
Upvotes: 16
Views: 9466
Reputation: 3154
To check the applinks in the ipa file.
Go to ipa -> append .zip as extension. Unzip it. You will able to see payload. Now right click and check show package content.
In the package content, you will find archived-expanded-entitlements.xcent.
Drag and drop this file to text edit. You will see your app links that is configured in associated domain. This way you can find if you are using correct applinks or not.
Upvotes: 0
Reputation: 307
If You using Cordova/Ionic v3
There is bug...
Check these Step:
There Are Four process
1.app console
App ids -> select app id→ enabled Associated Domains -> Done Provisioning Profile -> Edit again
AppName -> general <-> capability ->Associated Domains -> + ->
applinks:example.com
Ex - https://www.skyscanner.com/apple-app-site-association
Ex - https://www.skyscanner.com/.well-known/apple-app-site-association
Don’t append this file as json leave as text Ex -- of apple-app-site-association
4.(Important)
(cordova) project folder there are two files: Project -> plateform -> ios -> projectNameFolder ->
Entitlements-Debug.plist
Entitlements-Release.plist
When I add the value applinks:example.com to Capabilities->Associated domains->Domains, the Entitlements-Debug.plist got the lines:
<key>com.apple.developer.associated-domains</key> <array>
<string>applinks:example.com</string> </array>
BUT the Entitlements-Release.plist did not change. What I did to solve the issue is to copy-paste the generated lines form the Entitlements-Debug.plist. After this, I did the exact same Archive and upload process as before and everything worked fine.
and use ionic-plugin-deeplinks to get params and Route your Deeplink process
.......Thanks Later First Build Your Project
Upvotes: 1
Reputation: 51
Finally I was able to fix this issue:
Make sure that Entitlements-Release.plist
includes the correct entitlements. In my case, only Entitlements-Debug.plist
had the correct entitlements. Also when you export your app at the last step you usually should see a summary regarding included entitlements, make sure that com.apple.developer.associated-domains is listed with the appropriate applinks
entry.
It should look similar to:
source: https://forums.developer.apple.com/message/334862
Upvotes: 3
Reputation: 316
In my experience of observing differences like what you describe, in most cases, it has been due to the difference in the apps entitlements for dev & distribution profiles. Even though you may clearly state in your app project settings that you need certain capability (in this case "Associated Domains" checkbox), Xcode may not throw any error during signing process (when you export the app for distribution) if certain entitlements are missing in the provisioning profile.
They may be missing for 2 reasons - they may not have been added at the developer.apple.com portal for this profile, or Xcode didn't refresh the profile file from that portal. In the latter case, it helps to erase the old profile from your local disk to force Xcode to redownload it.
To verify that you actually have the com.apple.developer.associated-domains
entitlement in your distribution file, you can unzip the IPA file and check for the com.apple.developer.associated-domains
key in <key>Entitlements</key>
section as specified here.
Another way to debug this is to look at the device logs in the Console (Xcode-> Window-> Devices&Simulators-> Open Console), when running the AppStore/TestFlight version of the app. You can find a log line that's output by the iOS when the link is followed correctly into the app for the dev version of the app, and compare it with the case when it fails. Usually iOS complains at that point about missing entitlements, in the logs.
Upvotes: 9