0

From the today extension, I use the following code to open a url in the main app. It works totally fine in iOS 9+, but in iOS 8 it never hits the openUrl method in AppDelegate but simply launches the app.

extensionContext.OpenUrl (url, (bool success) => { } );

How can I achieve a similar deep linking behavior in iOS 8? I've also tried SharedApplication.OpenUrl which worked in iOS 9+ but not in iOS 8.

Sam A
  • 5
  • 1

1 Answers1

2

In iOS 8, you have to implement the version of openURL that was deprecated in iOS 9:

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation {
    NSArray *pathComponents = [url pathComponents];
    NSString *action = url.host;
    // handle URL
}        
Christopher Pickslay
  • 17,523
  • 6
  • 79
  • 92