浏览代码

added othr users patch for cordova 3.6

thedumbterminal 11 年之前
父节点
当前提交
5f8eaf7990
共有 1 个文件被更改,包括 6 次插入2 次删除
  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;
         }