From b617bef3560a2fcff219db47f5134042868a8d50 Mon Sep 17 00:00:00 2001 From: Aleksey Belouosv Date: Mon, 8 Oct 2018 16:09:21 +0300 Subject: [PATCH] [iOS] fix google authorization --- iphone/Maps/Classes/MapsAppDelegate.mm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index a6c4cf1114..2b80eeb1df 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -749,6 +749,16 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response { m_sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey]; + BOOL isGoogleURL = [[GIDSignIn sharedInstance] handleURL:url + sourceApplication:m_sourceApplication + annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; + if (isGoogleURL) + return YES; + + BOOL isFBURL = [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; + if (isFBURL) + return YES; + if ([self checkLaunchURL:[url.host rangeOfString:@"dlink.maps.me"].location != NSNotFound ? [self convertUniversalLink:url] : url]) { @@ -756,13 +766,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response return YES; } - BOOL isGoogleURL = [[GIDSignIn sharedInstance] handleURL:url - sourceApplication:m_sourceApplication - annotation:options[UIApplicationOpenURLOptionsAnnotationKey]]; - if (isGoogleURL) - return YES; - - return [[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]; + return NO; } - (BOOL)checkLaunchURL:(NSURL *)url