diff --git a/iphone/Maps/Classes/LocalNotificationManager.mm b/iphone/Maps/Classes/LocalNotificationManager.mm index cddca3f963..bb038312e8 100644 --- a/iphone/Maps/Classes/LocalNotificationManager.mm +++ b/iphone/Maps/Classes/LocalNotificationManager.mm @@ -138,7 +138,9 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult); else if ([ui[@"Action"] isEqualToString:PROMO_ACTION_NAME]) { [[Statistics instance] logEvent:@"'Promo' Notification Clicked"]; - [[UIApplication sharedApplication] openProVersionFrom:@"ios_promo_notif"]; + [self performAfterDelay:0.3 block:^{ + [[UIApplication sharedApplication] openProVersionFrom:@"ios_promo_notif"]; + }]; } } @@ -164,7 +166,8 @@ typedef void (^CompletionHandler)(UIBackgroundFetchResult); [components setDay:15]; [components setHour:12]; NSDate * date = [[NSCalendar currentCalendar] dateFromComponents:components]; - if ([date timeIntervalSinceNow] > 0) { + if ([date timeIntervalSinceNow] > 0) + { UILocalNotification * notification = [[UILocalNotification alloc] init]; notification.fireDate = [[NSCalendar currentCalendar] dateFromComponents:components]; notification.alertBody = NSLocalizedString(@"pro_version_is_free_today", nil); diff --git a/iphone/Maps/Classes/MapsAppDelegate.mm b/iphone/Maps/Classes/MapsAppDelegate.mm index f6c31a9a23..2ed79a8259 100644 --- a/iphone/Maps/Classes/MapsAppDelegate.mm +++ b/iphone/Maps/Classes/MapsAppDelegate.mm @@ -318,6 +318,10 @@ void InitLocalizedStrings() view.tag = NOTIFICATION_ALERT_VIEW_TAG; [view show]; } + else + { + [[LocalNotificationManager sharedManager] processNotification:notification]; + } } // We don't support HandleOpenUrl as it's deprecated from iOS 4.2