[ReactNative] Put launchOptions in RCTPushNotificationManager

This commit is contained in:
Andrew Rasmussen
2015-03-16 12:33:02 -07:00
parent 06125009dd
commit 5f538b2284
4 changed files with 90 additions and 4 deletions

View File

@@ -5,8 +5,12 @@
*/
'use strict';
var NativeModules = require('NativeModules');
var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
var RCTPushNotificationManager = NativeModules.RCTPushNotificationManager;
var _initialNotification = RCTPushNotificationManager.initialNotification;
var _notifHandlers = {};
var DEVICE_NOTIF_EVENT = 'remoteNotificationReceived';
@@ -30,6 +34,14 @@ class PushNotificationIOS {
_notifHandlers[handler] = null;
}
static popInitialNotification() {
var initialNotification = _initialNotification &&
new PushNotificationIOS(_initialNotification);
_initialNotification = null;
return initialNotification;
}
constructor(nativeNotif) {
this._data = {};