Universal Links – Make the Connection

Have you got any solution?

Hi Owenb, how can I share cookies from website to app?

Hi megan,
Sorry but I don’t have experience in sharing cookies between websites and apps. As far as I know, Apple’s Universal Links don’t provide a mechanism for this.

Hi owenb, Am following same steps as you mentioned,I am working on old project and its following objective c.Well the problem is my weblink is not hitting my app.

How were you able to upload apple-app-site-association file to Heroku instance? @owenb

Hi Akshitzaveri,
The apple-app-site-association file is uploaded just like the other website files (index.php, home.html, etc). Put it in the root folder. For example, when I created the Heroku tutorial site I uploaded the files by pushing my local git folder to the remote. My local folder also had the apple-app-site-association file and was pushed at the same time.

Owen

1 Like

Hi ryasingh,
What application you opening the weblink from?
Owen

Hi Owen,

Great tutorial. Been looking to try implementing universal links on my app too however looking through you tutorial i saw you included your project for this app. Since I heard that universal links will not work on iOS sims i tried to build it on a device so i built it with debug. However after building the app onto the device and clicking on the the arduino link on the home page it didn’t send me to the app. Did I do something wrong or did i misunderstood the functionality of a universal link?

Kind regards,
Ken

Hi Kenny,
There a few details that have to match in order for it to work properly.

  • The apple-app-site-association file’s appID property located on the web server must match your team ID/bundle ID, which is used while compiling/installing to your iOS device.

This means that you need your own website and it needs the apple-app-site-association file with the info matching the app installed on your device.

Unfortunately for this tutorial, readers aren’t able to download the final project and quickly test things out. The reason for this is because every developer was assigned a different Team ID by Apple and so there is a mismatch with what is on the tutorial Heroku website sample’s apple-app-site-association file and what is actually being compiled on the reader’s debug device.

Once the apple-app-site-association file on your website server matches your info, it should work properly.

Hope this helps!
Owen

Hi Owen,

Thanks for you reply. I followed your steps listed in the tutorial, I even created my own herokuapp with my own apple-app-site-association hosted on it. however on entering the website and clicking links within it doesn’t redirect me to my app.

I have checked that my team and bundle ID on apple-app-site-association matched the ones used to build the app.

I have used the 2 links you referred to at the end of your post to see if there are any problems with how i’m setting up my universal links… results for both of them are

(first image from the top: apple-app-site-association
second image: Apple Url Validator
third image: limitless-sierra-467 herokuapp Url Validator)

The second image shows that, “The domain has some validation issues” … i’m not sure what that actually means but i assume it has to do with apple backend checks to see if the app exist on the appstore and have associated domains enabled. the app id current does exist under my team id on the appstore but it doesn’t have a version that has associated domains.

I’m not sure exactly what i’m doing wrong. Can you please suggest other ways i could possible try troubleshoot this issue
Kind Regards,
Kenny

(EDIT: I want to also note i’m doing this on xamarin)
(EDIT2: I just tried again and safari shows a top bit where it says open in my app however i wanted that to happen on clicking a link or a button)

https://dev.branch.io/getting-started/universal-app-links/support/ios/#universal-links-can-be-disabled-unfortunately

within that link there i found my solution.

It says …

Universal Links work with a user driven element click across domains. Example: if there is a Universal Link on google.com pointing to bnc.lt, it will open the app.

Universal Links will not work with a user driven element click on the same domain. Example: if there is a Universal Link on google.com pointing to a different Universal Link on google.com, it will not open the app.

… Seriously? Hope this helps anyone else

How do I modify web page and Skype URI links to my website or app? Instead of “Open in app” button can i add different UI?

Sorry, can’t help you with this one.
Owen

If App is not installed on device then according to this tutorial, will App Store link of the app open? Here, we directly not added App Store link at any place in this tutorial. If we need to add App Store link then where we need to add it? Thanks

Hi shafqat,
If app isn’t installed then it directs to the website via default web browser like Safari.
Owen

Hi Owen Brown, I’am using universal links in my app, the problem is that method “userActivity: NSUserActivity” only call when is open or in background, but not call when is close.
How to call NSUserActivity If the app is not running?

Hi Owen, great article. I’m actually having the same concern as the guy in the most previous comment; where the delegate method in AppDelegate is not called unless the app is in background and am unable to find any reference online so far as to how to obtain NSUserActivity with Swift 3 if the app is not running. Do you have inside knowledge of this at the moment?

Thank you so much again in advance and for all the time you’ve been taking to answer the previous comments and for the knowledge. Cheers

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]