Эх сурвалжийг харах

Merge pull request #283 from thedumbterminal/cordova-3.6

cordova 3.6 fix
Sebastián Katzer 11 жил өмнө
parent
commit
5b6ea51baf

+ 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;
         }