Prechádzať zdrojové kódy

Use kAPPGeneralCategory instead of a string

Sebastián Katzer 8 rokov pred
rodič
commit
01cdc702e0

+ 2 - 1
src/ios/APPNotificationContent.m

@@ -23,6 +23,7 @@
 
 #import "APPNotificationContent.h"
 #import "APPNotificationOptions.h"
+#import "UNUserNotificationCenter+APPLocalNotification.h"
 #import <objc/runtime.h>
 
 @import UserNotifications;
@@ -65,7 +66,7 @@ static char optionsKey;
     self.body     = options.text;
     self.sound    = options.sound;
     self.badge    = options.badge;
-    self.categoryIdentifier = @"GENERAL";
+    self.categoryIdentifier = kAPPGeneralCategory;
 }
 
 #pragma mark -

+ 1 - 1
src/ios/UNUserNotificationCenter+APPLocalNotification.m

@@ -43,7 +43,7 @@ NSString * const kAPPGeneralCategory = @"GENERAL";
     UNNotificationCategory* category;
 
     category = [UNNotificationCategory
-                categoryWithIdentifier:@"GENERAL"
+                categoryWithIdentifier:kAPPGeneralCategory
                 actions:@[]
                 intentIdentifiers:@[]
                 options:UNNotificationCategoryOptionCustomDismissAction];