File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 1313#endif
1414#import " FirestackCloudMessaging.h"
1515#import " FirestackEvents.h"
16- #import " RCTConvert.h"
17-
18- // https://github.com/facebook/react-native/blob/master/Libraries/PushNotificationIOS/RCTPushNotificationManager.m
19- @implementation RCTConvert (UILocalNotification)
20-
21- + (UILocalNotification *)UILocalNotification : (id )json
22- {
23- NSDictionary <NSString *, id > *details = [self NSDictionary: json];
24- UILocalNotification *notification = [UILocalNotification new ];
25- notification.fireDate = [RCTConvert NSDate: details[@" fireDate" ]] ?: [NSDate date ];
26- notification.alertBody = [RCTConvert NSString: details[@" alertBody" ]];
27- notification.alertAction = [RCTConvert NSString: details[@" alertAction" ]];
28- notification.soundName = [RCTConvert NSString: details[@" soundName" ]] ?: UILocalNotificationDefaultSoundName;
29- notification.userInfo = [RCTConvert NSDictionary: details[@" userInfo" ]];
30- notification.category = [RCTConvert NSString: details[@" category" ]];
31- if (details[@" applicationIconBadgeNumber" ]) {
32- notification.applicationIconBadgeNumber = [RCTConvert NSInteger: details[@" applicationIconBadgeNumber" ]];
33- }
34- return notification;
35- }
36-
37- @end
16+ // #import "RCTConvert.h"
3817
3918@implementation FirestackCloudMessaging
4019
You can’t perform that action at this time.
0 commit comments