@@ -97,26 +97,6 @@ @implementation RCTConvert (UIBackgroundFetchResult)
97
97
98
98
@implementation RCTPushNotificationManager
99
99
100
- /* * DEPRECATED. UILocalNotification was deprecated in iOS 10. Please don't add new callsites. */
101
- static NSDictionary *RCTFormatLocalNotification(UILocalNotification *notification)
102
- {
103
- NSMutableDictionary *formattedLocalNotification = [NSMutableDictionary dictionary ];
104
- if (notification.fireDate ) {
105
- NSDateFormatter *formatter = [NSDateFormatter new ];
106
- [formatter setDateFormat: @" yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" ];
107
- NSString *fireDateString = [formatter stringFromDate: notification.fireDate];
108
- formattedLocalNotification[@" fireDate" ] = fireDateString;
109
- }
110
- formattedLocalNotification[@" alertAction" ] = RCTNullIfNil (notification.alertAction );
111
- formattedLocalNotification[@" alertBody" ] = RCTNullIfNil (notification.alertBody );
112
- formattedLocalNotification[@" applicationIconBadgeNumber" ] = @(notification.applicationIconBadgeNumber );
113
- formattedLocalNotification[@" category" ] = RCTNullIfNil (notification.category );
114
- formattedLocalNotification[@" soundName" ] = RCTNullIfNil (notification.soundName );
115
- formattedLocalNotification[@" userInfo" ] = RCTNullIfNil (RCTJSONClean (notification.userInfo ));
116
- formattedLocalNotification[@" remote" ] = @NO ;
117
- return formattedLocalNotification;
118
- }
119
-
120
100
/* * For delivered notifications */
121
101
static NSDictionary<NSString *, id> *RCTFormatUNNotification(UNNotification *notification)
122
102
{
@@ -267,23 +247,6 @@ + (void)setInitialNotification:(UNNotification *)notification
267
247
kInitialNotification = notification;
268
248
}
269
249
270
- // Deprecated
271
- + (void )didReceiveLocalNotification : (UILocalNotification *)notification
272
- {
273
- [[NSNotificationCenter defaultCenter ] postNotificationName: kLocalNotificationReceived
274
- object: self
275
- userInfo: RCTFormatLocalNotification (notification)];
276
- }
277
-
278
- // Deprecated
279
- + (void )didReceiveRemoteNotification : (NSDictionary *)notification
280
- {
281
- NSDictionary *userInfo = @{@" notification" : notification};
282
- [[NSNotificationCenter defaultCenter ] postNotificationName: RCTRemoteNotificationReceived
283
- object: self
284
- userInfo: userInfo];
285
- }
286
-
287
250
- (void )invalidate
288
251
{
289
252
[super invalidate ];
0 commit comments