Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How debug Universal links

I use the cordova plugin "ionic-plugin-deeplinks" (to my knowledge also works with a plain cordova app).

On Android, links when clicked let users choice between chrome and my application. => I suppose that app links works => As I'm able to access window.IonicDeeplink and redirect the user to the right page

I'm not able to have the same behavior on iOS, when I click a link I always get the app open in Safari.

How can I find clue on issues ?

More context:

  • apple-app-site-association is got with a HTTP 200 (over https only), it's located in /.well-known/apple-app-site-association:
    • I checked TeamID and BundleID 5 times (at least);
    • with the branch.io validator i get all validations green:
      • Your domain is valid (valid DNS).
      • Your file is served over HTTPS.
      • Your server does not return error status codes greater than 400.
      • Your file's 'content-type' header was found :)
      • Your JSON is validated.
    • with the apple validator, I got : "Action required Could not extract required information for Universal Links. Learn how to implement the recommended Universal Links. Error no apps with domain entitlements The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update." (but some devs said that working app add the same error) what to do with that result?
    • when monitoring server's log while installing the app with Xcode I see a request get a HTTP 200 on apple-app-site-association
  • while installing the app with Xcode I got no logs referring to swcd in Xcode (I read here that I should if I had error while installing the app). Is a successful installation silent?
  • I followed that guide to setup entitlements, but some things feel odd with it:
    • Unlike the snapshot in the guide, I didn't found any *.entitlements file in my project. Should I have one with cordova? (my xCode seems to remember my setting though). Is it possible to check that installed app get entitlements?
    • I did set my domain in Xcode like this: applinks:mydomain.com and the switch is ON. But I never uploaded any thing from my local dev environment to apple services. Should I have? If yes, how ?

My current interrogations are highlighted but any explanations on any lack of understanding will be more than welcome!!!

Until then I started a verification for testFlight looking for more info.

like image 413
Alexandre SIRKO Avatar asked Aug 03 '18 15:08

Alexandre SIRKO


People also ask

How do I test a universal link?

TEST THE UNIVERSAL LINKS Run the application on the simulator once to make sure the application is installed and running fine. 2. Keep the same simulator launched and running. Go to your simulator browser and open type the ngrok domain address i.e., https://1bd39880fbad.ngrok.io in my case.

How do I debug a deep link?

Choose Wait for executable to be launchedNow fire up the deep link or notification to launch the App. Debugger attaches to the app process automatically. Quit and relaunch the App. Do this multiple times if required.

How do universal links work?

The implementation of universal links is similar to a standard deep link. However, instead of defining a custom URL scheme, a universal link matches a set of web pages to locations in-app. This means that when a user opens a web page which is matched as described, iOS automatically redirects the user to the app.

Are universal links secure?

Specifically, universal links are: Unique. Unlike custom URL schemes, universal links can't be claimed by other apps, because they use standard HTTP or HTTPS links to your website. Secure.


1 Answers

while installing the app with Xcode I got no logs referring to swcd in xCode

I implemented Universal Links manually, but situation was similar. Particularly I mentioned empty swcd process log while installing the app, and it turned out that most likely iOS didn't even try to download apple-app-site-association file, like if responsible process wasn't run. In my case device restart helped and deep-linking began to work.

Thus I think restarting device is one another step in troubleshooting when you are sure about all your setup.

like image 139
Varrry Avatar answered Oct 19 '22 05:10

Varrry