Skip to content

Commit

Permalink
Added logging to push registration failure.
Browse files Browse the repository at this point in the history
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 facebook#8046

Differential Revision: D3454922

Pulled By: javache

fbshipit-source-id: a96896d97d97cfe1bd319e6490750838dfaad3cd
  • Loading branch information
danielbraun authored and Morgan Pretty committed Aug 24, 2016
1 parent ec3ce2d commit c2c4771
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Libraries/PushNotificationIOS/PushNotificationIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ const DEVICE_LOCAL_NOTIF_EVENT = 'localNotificationReceived';
* {
* [RCTPushNotificationManager didReceiveLocalNotification:notification];
* }
* - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
* {
* NSLog(@"%@", error);
* }
* ```
*/
class PushNotificationIOS {
Expand Down

0 comments on commit c2c4771

Please sign in to comment.