Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from jonathanpenn/master

Fixed bug where the map URL wouldn't be launched the first time
  • Loading branch information...
commit 0456cc7560516b13bae6b5cff01b2a6c47423957 2 parents 99ab0ec + 491703e
@simonmaddox authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 GoogleTransit/AppDelegate.m
View
9 GoogleTransit/AppDelegate.m
@@ -30,7 +30,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
-
+
+ if (launchOptions[UIApplicationLaunchOptionsURLKey]) {
+ double delayInSeconds = 0.3;
+ dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
+ dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
+ [self application:application openURL:launchOptions[UIApplicationLaunchOptionsURLKey] sourceApplication:nil annotation:nil];
+ });
+ }
return YES;
}
Please sign in to comment.
Something went wrong with that request. Please try again.