File tree 1 file changed +1
-22
lines changed
1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 13
13
#endif
14
14
#import " FirestackCloudMessaging.h"
15
15
#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"
38
17
39
18
@implementation FirestackCloudMessaging
40
19
You can’t perform that action at this time.
0 commit comments