Skip to content

Commit 2aef383

Browse files
authored
docs: remove pre iOS10 information from README (#209)
1 parent af8e98e commit 2aef383

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ At the top of the file:
9393
Then, 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
119114
didReceiveNotificationResponse:(UNNotificationResponse *)response
120115
withCompletionHandler:(void (^)(void))completionHandler

example/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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"

example/ios/example/AppDelegate.m

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)