File tree Expand file tree Collapse file tree 3 files changed +3
-19
lines changed Expand file tree Collapse file tree 3 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,6 @@ At the top of the file:
9393Then, add the following lines:
9494
9595``` objective-c
96- // Required to register for notifications
97- - (void )application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
98- {
99- [ RNCPushNotificationIOS didRegisterUserNotificationSettings: notificationSettings ] ;
100- }
10196// Required for the register event.
10297- (void )application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
10398{
@@ -114,7 +109,7 @@ fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
114109{
115110 [ RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError: error ] ;
116111}
117- // IOS 10+ Required for localNotification event
112+ // Required for localNotification event
118113- (void )userNotificationCenter:(UNUserNotificationCenter *)center
119114didReceiveNotificationResponse:(UNNotificationResponse *)response
120115 withCompletionHandler:(void (^)(void ))completionHandler
Original file line number Diff line number Diff line change @@ -266,6 +266,7 @@ export const App = () => {
266266 onPress = { sendSilentNotification }
267267 label = "Send fake silent notification"
268268 />
269+
269270 < Button
270271 onPress = { ( ) => PushNotificationIOS . setApplicationIconBadgeNumber ( 42 ) }
271272 label = "Set app's icon badge to 42"
Original file line number Diff line number Diff line change @@ -78,13 +78,6 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
7878 UNAuthorizationOptionBadge );
7979}
8080
81- // Required to register for notifications
82- - (void )application : (UIApplication *)application
83- didRegisterUserNotificationSettings :
84- (UIUserNotificationSettings *)notificationSettings {
85- [RNCPushNotificationIOS
86- didRegisterUserNotificationSettings: notificationSettings];
87- }
8881// Required for the register event.
8982- (void )application : (UIApplication *)application
9083 didRegisterForRemoteNotificationsWithDeviceToken : (NSData *)deviceToken {
@@ -106,12 +99,7 @@ - (void)application:(UIApplication *)application
10699 [RNCPushNotificationIOS
107100 didFailToRegisterForRemoteNotificationsWithError: error];
108101}
109- // Required for the localNotification event.
110- - (void )application : (UIApplication *)application
111- didReceiveLocalNotification : (UILocalNotification *)notification {
112- [RNCPushNotificationIOS didReceiveLocalNotification: notification];
113- }
114- // IOS 10+ Required for local notification tapped event
102+ // Required for local notification tapped event
115103- (void )userNotificationCenter : (UNUserNotificationCenter *)center
116104 didReceiveNotificationResponse : (UNNotificationResponse *)response
117105 withCompletionHandler : (void (^)(void ))completionHandler {
You can’t perform that action at this time.
0 commit comments