Skip to content

Commit

Permalink
iOS: Use the non deprecated application:openURL function
Browse files Browse the repository at this point in the history
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ø <[email protected]>
  • Loading branch information
AndyShawQt committed Apr 18, 2018
1 parent 8498888 commit 34e34f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugins/platforms/ios/qiosapplicationdelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 34e34f2

Please sign in to comment.