diff --git a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m index 2b13849f9..ccfe77e9b 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m +++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m @@ -118,18 +118,7 @@ + (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIW // only allow-intent if it's a UIWebViewNavigationTypeLinkClicked (anchor tag) OR // it's a UIWebViewNavigationTypeOther, and it's an internal link if ([[self class] shouldOpenURLRequest:request navigationType:navigationType]){ -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 - // CB-11895; openURL with a single parameter is deprecated in iOS 10 - // see https://useyourloaf.com/blog/openurl-deprecated-in-ios10 - if ([[UIApplication sharedApplication] respondsToSelector:@selector(openURL:options:completionHandler:)]) { - [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; - } else { - [[UIApplication sharedApplication] openURL:url]; - } -#else - // fall back if on older SDK - [[UIApplication sharedApplication] openURL:url]; -#endif + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; } // consume the request (i.e. no error) if it wasn't handled above diff --git a/CordovaLib/Classes/Public/CDVAppDelegate.m b/CordovaLib/Classes/Public/CDVAppDelegate.m index 5408903e7..6a339f43f 100644 --- a/CordovaLib/Classes/Public/CDVAppDelegate.m +++ b/CordovaLib/Classes/Public/CDVAppDelegate.m @@ -73,7 +73,7 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N // this happens while we are running ( in the background, or from within our own app ) // only valid if 40x-Info.plist specifies a protocol to handle -- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation +- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { if (!url) { return NO; @@ -83,12 +83,12 @@ - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplic [openURLData setValue:url forKey:@"url"]; - if (sourceApplication) { - [openURLData setValue:sourceApplication forKey:@"sourceApplication"]; + if (options[UIApplicationOpenURLOptionsSourceApplicationKey]) { + [openURLData setValue:options[UIApplicationOpenURLOptionsSourceApplicationKey] forKey:@"sourceApplication"]; } - if (annotation) { - [openURLData setValue:annotation forKey:@"annotation"]; + if (options[UIApplicationOpenURLOptionsAnnotationKey]) { + [openURLData setValue:options[UIApplicationOpenURLOptionsAnnotationKey] forKey:@"annotation"]; } // all plugins will get the notification, and their handlers will be called diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index 24ffe8db8..616d9ff3b 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -601,16 +601,6 @@ - (void)didReceiveMemoryWarning // Release any cached data, images, etc. that aren't in use. } -- (void)viewDidUnload -{ - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; - - [CDVUserAgentUtil releaseLock:&_userAgentLockToken]; - - [super viewDidUnload]; -} - #pragma mark CordovaCommands - (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className