PC Dreams (Paulo Cristo) před 9 roky
rodič
revize
66f28161f0
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      src/ios/APPLocalNotification.m

+ 6 - 1
src/ios/APPLocalNotification.m

@@ -717,7 +717,12 @@
         // Deliver the notification at the fire date.
         UNCalendarNotificationTrigger *trigger = [UNCalendarNotificationTrigger triggerWithDateMatchingComponents:dateComponents repeats:NO];
         
-        UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"DefaultNotificationIdentifier" content:content trigger:trigger];
+        NSString *identifier = @"DefaultNotificationIdentifier";
+        if(notification.userInfo!=nil && [notification.userInfo objectForKey:@"id"]!=nil) {
+            identifier = [notification.userInfo objectForKey:@"id"];
+        }
+        
+        UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:identifier content:content trigger:trigger];
         
         /// 3. schedule localNotification
         UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];