Added logging to push registration failure.

Summary:
It seems it's a common problem people trying to register for push notifications in their simulator, and not understanding why the "register" event never works.
I've wasted a few hours myself on this issue.
This commit simply logs any failures with push registration, preventing confusion.
Closes https://github.com/facebook/react-native/pull/8046

Differential Revision: D3454922

Pulled By: javache

fbshipit-source-id: a96896d97d97cfe1bd319e6490750838dfaad3cd
This commit is contained in:
Daniel Braun 2016-06-18 08:53:58 -07:00 committed by Facebook Github Bot
parent e08197b998
commit c6020a0ef4
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ const DEVICE_LOCAL_NOTIF_EVENT = 'localNotificationReceived';
* {
* [RCTPushNotificationManager didReceiveLocalNotification:notification];
* }
* - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
* {
* NSLog(@"%@", error);
* }
* ```
*/
class PushNotificationIOS {