Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Options for presenting website when website/app supports Universal Links in iOS 9

In iOS 9 I can register my website (FooSite) to link to my app via Universal Link. Now let's say a user in another app (BarApp) encounters an HTTP link to my app (FooApp).

  • Does BarApp have the option to present FooSite instead of allowing iOS to resolve the universal link and launch FooApp?

  • Do the options change between UIWebView, WKWebView and Safari View Controller?

like image 617
libovness Avatar asked Jul 01 '15 14:07

libovness


People also ask

How do I enable universal links in iOS?

How do I set up Universal Links for my app? Log into your Apple developer account and go to the app's ID page. Enable the Associated Domains app service. Take note of your Prefix (bundle ID) and your ID (team ID) - you will need them later.

How do I turn on universal links?

Universal Links are automatically turned on for all devices that use iOS 9 or above as the operating system. To return to your previous app, click the back arrow at the top of the page. We recommend using the latest available version of YouTube app because it has more features than the mobile web version.

How do I host an AASA file?

Hosting the AASA File on Your Domain Once you are ready with your AASA file, you can now host it on your domain either at https://<<yourdomain>>/apple-app-site-association or at https://<<yourdomain>>/.well-known/apple-app-site-association. Upload the apple-app-site-association file to your HTTPS web server.

What is apple Universal link?

Universal Links for DevelopersSeamlessly link to content in your app or on your website. With universal links, you can always give users the most integrated mobile experience, even when your app isn't installed on their device.


1 Answers

To answer your first question, BarApp should not. I haven't tried to prevent this, but I can't see how, short of not firing the URI at all, BarApp could launch FooSite rather than FooApp.

To answer your second question, SFSafariViewController is extremely limited in what the developer is allowed to access. You can set an initial URL, know when the initial URL loads, and know when the user has tapped the dismiss button. That's it. No inspecting the current URL, no intervening in requests, etc.

like image 174
st.derrick Avatar answered Oct 18 '22 13:10

st.derrick