react-native/Examples/UIExplorer/UIExplorer
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
..
Base.lproj added method to set thumb image 2015-11-24 16:10:04 -08:00
Images.xcassets Update Image docs and examples to the new asset system 2016-01-27 13:47:45 -08:00
NativeExampleViews Refactored subview management 2016-06-07 00:14:39 -07:00
UIExplorerBundle Support bundle argument for image loading 2016-08-31 17:43:49 -07:00
AppDelegate.h 'Update app properties in runtime' UIExplorer demo 2015-11-12 11:43:34 -08:00
AppDelegate.m registration error event 2016-09-06 11:13:40 -07:00
Info.plist check for NSPhotoLibraryUsageDescription in plist 2016-08-18 07:28:43 -07:00
LegacyImage@2x.png Cleanup FBReactKit BUCK paths 2016-08-31 17:43:49 -07:00
main.m Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00