@@ -97,26 +97,6 @@ @implementation RCTConvert (UIBackgroundFetchResult)
9797
9898@implementation RCTPushNotificationManager
9999
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-
120100/* * For delivered notifications */
121101static NSDictionary<NSString *, id> *RCTFormatUNNotification(UNNotification *notification)
122102{
@@ -267,23 +247,6 @@ + (void)setInitialNotification:(UNNotification *)notification
267247 kInitialNotification = notification;
268248}
269249
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-
287250- (void )invalidate
288251{
289252 [super invalidate ];
0 commit comments