Uh oh!
There was an error while loading. Please reload this page.
[PushNotificationsIOS] registration error event - #9650
Conversation
ghost
commented
Aug 29, 2016
By analyzing the blame information on this pull request, we identified @nicklockwood and @JAStanton to be potential reviewers. |
ghost
commented
Aug 29, 2016
@nevir updated the pull request - view changes |
ghost
commented
Aug 29, 2016
@nevir updated the pull request - view changes |
ghost
commented
Aug 29, 2016
@nevir updated the pull request - view changes |
facebook-github-bot
commented
Aug 29, 2016
@nevir updated the pull request - view changes |
There was a problem hiding this comment.
Please format like application:(__unused UIApplication *)application didRegister...
javache
commented
Sep 6, 2016
Looks good, just a couple of small nits |
@javache updated (and rebased); thanks for the review! |
ghost
commented
Sep 6, 2016
@nevir updated the pull request - view changes |
javache
commented
Sep 6, 2016
@facebook-github-bot shipit |
ghost
commented
Sep 6, 2016
Thanks for importing. If you are an FB employee go to Phabricator to review internal test results. |
Summary: This is an updated version of #2336 and #7694. --- This adds a `registrationError` event that is emitted by `PushNotificationIOS` whenever an application receives a registration error from APNS (APNS service failure, running on simulator, etc). This event fires to the exclusion of the `register` event (and vice versa). **How to use** Add the following to your `AppDelegate.m`: ```obj-c - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error]; } ``` And register an event handler for the event: ```js PushNotificationIOS.addEventListener('registrationError', function({ message, code }) { // Complete your registration process in error. }); ``` **Test plan** Added support for this event (and `register`) to UIExplorer as a proof of concept. Navigating to the push notifications example on a simulator is an easy way to reproduce this e Closesreact/react-native#9650 Differential Revision: D3822142 Pulled By: javache fbshipit-source-id: a15ed8941b74dc3eed2c44c658deccbcaf39ce3d
Summary: This is an updated version of react#2336 and react#7694. --- This adds a `registrationError` event that is emitted by `PushNotificationIOS` whenever an application receives a registration error from APNS (APNS service failure, running on simulator, etc). This event fires to the exclusion of the `register` event (and vice versa). **How to use** Add the following to your `AppDelegate.m`: ```obj-c - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error]; } ``` And register an event handler for the event: ```js PushNotificationIOS.addEventListener('registrationError', function({ message, code }) { // Complete your registration process in error. }); ``` **Test plan** Added support for this event (and `register`) to UIExplorer as a proof of concept. Navigating to the push notifications example on a simulator is an easy way to reproduce this e Closesreact#9650 Differential Revision: D3822142 Pulled By: javache fbshipit-source-id: a15ed8941b74dc3eed2c44c658deccbcaf39ce3d
This is an updated version of #2336 and #7694.
This adds a
registrationErrorevent that is emitted byPushNotificationIOSwhenever an application receives a registration error from APNS (APNS service failure, running on simulator, etc). This event fires to the exclusion of theregisterevent (and vice versa).How to use
Add the following to your
AppDelegate.m:And register an event handler for the event:
Test plan
Added support for this event (and
register) to UIExplorer as a proof of concept. Navigating to the push notifications example on a simulator is an easy way to reproduce this event.