Browse Source

Add instead of replace permissions on iOS

Sebastián Katzer 10 năm trước cách đây
mục cha
commit
beca9e54c0
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/ios/UIApplication+APPLocalNotification.m

+ 4 - 1
src/ios/UIApplication+APPLocalNotification.m

@@ -62,7 +62,10 @@
         UIUserNotificationType types;
         UIUserNotificationSettings *settings;
 
-        types = UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;
+        settings = [[UIApplication sharedApplication]
+                    currentUserNotificationSettings];
+
+        types = settings.types|UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;
 
         settings = [UIUserNotificationSettings settingsForTypes:types
                                                      categories:nil];