Kaynağa Gözat

Fix didReceiveLocalNotification: call within didFinishLaunchingWithOptions:

Sebastián Katzer 11 yıl önce
ebeveyn
işleme
87f29b67b0
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/ios/APPLocalNotification.m

+ 2 - 2
src/ios/APPLocalNotification.m

@@ -316,7 +316,7 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
 
     if (localNotification)
     {
-        [self didReceiveLocalNotification:notification];
+        [self didReceiveLocalNotification:[NSNotification notificationWithName:CDVLocalNotification object:localNotification]];
     }
 }
 
@@ -355,7 +355,7 @@ NSString *const kAPP_LOCALNOTIFICATION = @"APP_LOCALNOTIFICATION";
  * @param {String} id    The ID of the notification
  * @param {String} json  A custom (JSON) string
  */
-- (void) fireEvent:(NSString*) event id:(NSString*) id json:(NSString*) json
+- (void) fireEvent:(NSString*)event id:(NSString*)id json:(NSString*)json
 {
     UIApplicationState state = [[UIApplication sharedApplication] applicationState];
     bool isActive            = state == UIApplicationStateActive;