iOS: Use the non deprecated application:openURL function

In iOS 9.0, the original application:openURL function was deprecated
and replaced with a newer one. As iOS 9.0 is no longer supported we can
safely switch to the new one. This is also required to prevent a crash
when the LSSupportsOpeningDocumentsInPlace and UIFileSharingEnabled keys
are set to true in the Info.plist file.

Change-Id: I59a7ee82e3ddb2777ef78e28b964ef8666c629af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Andy Shaw 2018-04-18 15:37:58 +02:00
parent 84988886a5
commit 34e34f2209

View File

@ -50,11 +50,10 @@
@implementation QIOSApplicationDelegate
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
{
Q_UNUSED(application);
Q_UNUSED(sourceApplication);
Q_UNUSED(annotation);
Q_UNUSED(options);
if (!QGuiApplication::instance())
return NO;