react-native/Libraries
Ian MacLeod 4f89fa9cf3 registration error event
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
Closes https://github.com/facebook/react-native/pull/9650

Differential Revision: D3822142

Pulled By: javache

fbshipit-source-id: a15ed8941b74dc3eed2c44c658deccbcaf39ce3d
2016-09-06 11:13:40 -07:00
..
ART Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
ActionSheetIOS ActionSheetIOS - Pass URL, not file contents to UIActivityViewController for file URLs. 2016-09-06 04:43:36 -07:00
AdSupport Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Animated fix NativeAnimated event listener bug 2016-09-04 15:58:47 -07:00
AppRegistry Auto-fix lint errors 2016-08-09 06:43:46 -07:00
AppState Auto-fix lint errors 2016-08-09 06:43:46 -07:00
BatchedBridge Update the native CLC for relay queries 2016-08-15 12:13:45 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll Explicit information to help in linking 2016-09-01 21:43:47 -07:00
Components Update Switch.js docs - tintColor changes border 2016-09-05 13:43:37 -07:00
CustomComponents Allow the disabling of navigation gestures. 2016-08-21 13:13:46 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Get server host in setupDevtools for Android 2016-07-19 05:58:29 -07:00
EventEmitter Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Experimental Improve swipable row gestures to feel more natural 2016-08-31 18:13:35 -07:00
Fetch Fixed what fetch.js exports 2016-07-14 11:13:27 -07:00
Geolocation Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Image Fix images not reloading after memory warning 2016-09-06 09:28:35 -07:00
Inspector Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Interaction Incremental: Fix require of performanceNow 2016-08-25 17:43:48 -07:00
JavaScriptAppEngine Log timer identifiers in systrace 2016-09-06 03:59:02 -07:00
LayoutAnimation Auto-fix lint errors 2016-08-09 06:43:46 -07:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Modal Fix Popover problem for RTL 1/n 2016-07-19 10:43:29 -07:00
NativeAnimation Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
NavigationExperimental do not reset layout state if they are the same in NavigationTransitioner 2016-08-26 10:58:31 -07:00
Network For file uploads, don't stomp on developer's Content-Type header 2016-09-05 14:58:40 -07:00
PermissionsAndroid Change Android Permission Module to use promises 2016-08-16 12:58:39 -07:00
PushNotificationIOS registration error event 2016-09-06 11:13:40 -07:00
QuickPerformanceLogger AdsManager now uses new react native QPL identifiers 2016-07-20 07:28:36 -07:00
RCTTest Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS JS1: Fix Scrolling in YellowBox 2016-08-16 16:13:51 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage Auto-fix lint errors 2016-08-09 06:43:46 -07:00
StyleSheet re-enable and fix tests 2016-09-03 01:13:37 -07:00
Text Include CSSLayout.h consistently with other project includes 2016-09-06 09:13:39 -07:00
Utilities fixed polyfill for BackAndroid 2016-08-30 10:58:45 -07:00
Vibration Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
WebSocket Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
react-native Create a RTLExample for OSS 2016-08-18 20:58:39 -07:00
vendor Cleanup clear/set/throwImmediate 2016-08-12 07:28:38 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00