Bladeren bron

added othr users patch for cordova 3.6

thedumbterminal 11 jaren geleden
bovenliggende
commit
5f8eaf7990
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      src/ios/APPLocalNotification.m

+ 6 - 2
src/ios/APPLocalNotification.m

@@ -572,8 +572,12 @@
 
     for (UILocalNotification* notification in notifications)
     {
-        NSString* notId = [[notification.userInfo objectForKey:@"id"] stringValue];
-
+        NSString* notId = NULL;
+        if ([[notification.userInfo objectForKey:@"id"] isKindOfClass:[NSString class]] ) {
+            notId = [notification.userInfo objectForKey:@"id"];
+        } else {
+            notId = [[notification.userInfo objectForKey:@"id"] stringValue];
+        }
         if ([notId isEqualToString:id]) {
             return notification;
         }