-(BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation {
//Get the deeplink from "url"
}
And, you can execute the deeplink in the HomeViewController of your app
//Check if deeplink is a valid APM deeplink
if([APMWKUtils schemeApmValidForUrl:url.absoluteString]) {
//Launch the deeplink
[APMWebViewUtils handleUrl:[NSURLRequest requestWithURL:deeplink] controller:self];
}
If needed, you can use dispatch_after to launch the deeplink after some delay
//Check if deeplink is a valid APM deeplink
if([APMWKUtils schemeApmValidForUrl:url.absoluteString]) {
//Launch the deeplink after 500ms
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[APMWebViewUtils handleUrl:[NSURLRequest requestWithURL:deeplink] controller:self];
});
}
In file AndroidManifest.xml, add the scheme apm<PARTNER_ID>, PARTNER_ID is the ID transmitted during the implementation of the project