Преглед изворни кода

Add instead of replace permissions on iOS

Sebastián Katzer пре 10 година
родитељ
комит
beca9e54c0
1 измењених фајлова са 4 додато и 1 уклоњено
  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];