Rename methods in RCTPushNotificationManager so app store doesn't warn

Summary:
Including RCTPushNotificationManager is required for local notifications, which don't require a Push Notifications entitlement on your provisioning profile. However, if you don't have the entitlement, the app store warns you when you push an app build that contains `application:didRegisterForRemoteNotificationsWithDeviceToken:`, even if it isn't being called. This renames the methods so they have different names from the ones on UIApplication so the app store doesn't warn about them.
Closes https://github.com/facebook/react-native/pull/4897

Reviewed By: spicyj

Differential Revision: D2780533

Pulled By: nicklockwood

fb-gh-sync-id: 1a688f1ebd3cc9f86ba340ce453fdbfb46949839
This commit is contained in:
Michelle Todd
2016-01-05 02:42:18 -08:00
committed by facebook-github-bot-4
parent ee82bad3f7
commit 1dc5dca604
3 changed files with 16 additions and 11 deletions

View File

@@ -39,15 +39,20 @@ var NOTIF_REGISTER_EVENT = 'remoteNotificationsRegistered';
* And then in your AppDelegate implementation add the following:
*
* ```
* // Required for the register event.
* // Required to register for notifications
* - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
* {
* [RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
* }
* // Required for the register event.
* - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
* {
* [RCTPushNotificationManager application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
* [RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
* }
* // Required for the notification event.
* - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification
* {
* [RCTPushNotificationManager application:application didReceiveRemoteNotification:notification];
* [RCTPushNotificationManager didReceiveRemoteNotification:notification];
* }
* ```
*/