{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/9650","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/9650/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9650/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/9650/events","html_url":"https://github.com/facebook/react-native/pull/9650","id":173877137,"number":9650,"title":"[PushNotificationsIOS] registration error event","user":{"login":"nevir","id":41373,"avatar_url":"https://avatars.githubusercontent.com/u/41373?v=3","gravatar_id":"","url":"https://api.github.com/users/nevir","html_url":"https://github.com/nevir","followers_url":"https://api.github.com/users/nevir/followers","following_url":"https://api.github.com/users/nevir/following{/other_user}","gists_url":"https://api.github.com/users/nevir/gists{/gist_id}","starred_url":"https://api.github.com/users/nevir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevir/subscriptions","organizations_url":"https://api.github.com/users/nevir/orgs","repos_url":"https://api.github.com/users/nevir/repos","events_url":"https://api.github.com/users/nevir/events{/privacy}","received_events_url":"https://api.github.com/users/nevir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/CLA%20Signed","name":"CLA Signed","color":"e7e7e7"},{"url":"https://api.github.com/repos/facebook/react-native/labels/GH%20Review:%20review-needed","name":"GH Review: review-needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-29T21:29:01Z","updated_at":"2016-08-29T21:39:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/9650","html_url":"https://github.com/facebook/react-native/pull/9650","diff_url":"https://github.com/facebook/react-native/pull/9650.diff","patch_url":"https://github.com/facebook/react-native/pull/9650.patch"},"body":"This is an updated version of #2336 and #7694.\r\n\r\n---\r\n\r\nThis 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).\r\n\r\n**How to use**\r\n\r\nAdd the following to your `AppDelegate.m`:\r\n\r\n```obj-c\r\n- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error\r\n{\r\n  [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];\r\n}\r\n```\r\n\r\nAnd register an event handler for the event:\r\n\r\n```js\r\nPushNotificationIOS.addEventListener('registrationError', function({ message, code }) {\r\n  // Complete your registration process in error.\r\n});\r\n```\r\n\r\n**Test plan**\r\n\r\nAdded 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.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/243265381","html_url":"https://github.com/facebook/react-native/pull/9650#issuecomment-243265381","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9650","id":243265381,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T21:39:37Z","updated_at":"2016-08-29T21:39:37Z","body":"@nevir updated the pull request - [view changes](https://github.com/facebook/react-native/pull/9650/files/324f45e7c031b6c315c580349a402fdc29bf4a69..fb0f5cee0f8d6c0f0d71e2d8194b8fe30fdf724c)"}}
{"actor":{"display_login":"facebook-github-bot"}}