I have implemented universal links into my app but for reason, AASA file is not going to be uploaded on server for now.
TEST THE UNIVERSAL LINKSRun 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 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.
When a user on an iOS device running iOS 9 or later clicks on a link, the device checks whether that link should be handled by an app instead of being passed off to Safari.
First, open Xcode, go to Project settings -> capabilities. Scroll down to Associated Domains and turn it on. Once it is enabled, we shall add any URL that implements our apple-app-site-association resource, preceded by app links. Inside the Domains section, add a applinks:myApp.com.
Yes you actually can!
You can test you app's response to a deep link without actually implementing the remote side by calling this function from terminal:
$ xcrun simctl openurl booted 'YOUR_LINK_HERE'
This will trigger the following callback in your app's appDelegate:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool
...which is exactly the behavior you should expect from a deep link.
just don't forget to actually have the simulator up ;-)
As for universal links - the appDelegate callback is slightly different, but its a very small mental leap:
func application(_ app: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
if let url = userActivity.webpageURL {
// parse the url and decide how to handle the universal link
}
}
return true
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With