diff options
author | Alex Zolotarev <alex@maps.me> | 2015-09-08 22:08:35 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:04:07 +0300 |
commit | 2c2cf65a0c30c9a53cf74ca92ab622f7f3791812 (patch) | |
tree | e343c1da8ecffc4b711a62a64e72a2fef0663908 /iphone/Maps/Classes/MapsAppDelegate.mm | |
parent | c3ab639c71a6b8fac8f78f688e223db955dcc0aa (diff) |
[ios] Correctly handle return value for application:didFinishLaunchingWithOptions:
@TODO: Should we return immediately and do nothing if we have an url but can’t handle it?
Diffstat (limited to 'iphone/Maps/Classes/MapsAppDelegate.mm')
-rw-r--r-- | iphone/Maps/Classes/MapsAppDelegate.mm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index dd3ba1440a..dade6af005 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -156,12 +156,15 @@ void InitLocalizedStrings() - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Initialize all 3party engines. - [[Statistics instance] application:application didFinishLaunchingWithOptions:launchOptions]; + BOOL returnValue = [[Statistics instance] application:application + didFinishLaunchingWithOptions:launchOptions]; + + NSURL * urlUsedToLaunchMaps = launchOptions[UIApplicationLaunchOptionsURLKey]; + if (urlUsedToLaunchMaps != nil) + returnValue |= [self checkLaunchURL:urlUsedToLaunchMaps]; + else + returnValue = YES; - NSURL * url = launchOptions[UIApplicationLaunchOptionsURLKey]; - if (url != nil) - [self checkLaunchURL:url]; - [HttpThread setDownloadIndicatorProtocol:[MapsAppDelegate theApp]]; [self trackWatchUser]; @@ -215,7 +218,7 @@ void InitLocalizedStrings() application.applicationIconBadgeNumber = f.GetCountryTree().GetActiveMapLayout().GetOutOfDateCount(); f.GetLocationState()->InvalidatePosition(); - return YES; + return returnValue; } - (void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler |