Commit d503b3f4 authored by Libin Lu's avatar Libin Lu

remove local bridge

parent ba4368b4
...@@ -128,12 +128,11 @@ RCT_ENUM_CONVERTER(UNNotificationPresentationOptions, (@{ ...@@ -128,12 +128,11 @@ RCT_ENUM_CONVERTER(UNNotificationPresentationOptions, (@{
@end @end
@interface RNFIRMessaging () @interface RNFIRMessaging ()
@property (nonatomic, strong) NSMutableDictionary *notificationCallbacks; @property (nonatomic, strong) NSMutableDictionary *notificationCallbacks;
@end @end
@implementation RNFIRMessaging @implementation RNFIRMessaging
@synthesize bridge = _bridge;
RCT_EXPORT_MODULE(); RCT_EXPORT_MODULE();
- (NSArray<NSString *> *)supportedEvents { - (NSArray<NSString *> *)supportedEvents {
...@@ -214,11 +213,11 @@ RCT_EXPORT_METHOD(isDirectChannelEstablished:(RCTPromiseResolveBlock)resolve rej ...@@ -214,11 +213,11 @@ RCT_EXPORT_METHOD(isDirectChannelEstablished:(RCTPromiseResolveBlock)resolve rej
RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) RCT_EXPORT_METHOD(getInitialNotification:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{ {
UILocalNotification *localUserInfo = _bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; UILocalNotification *localUserInfo = self.bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey];
if (localUserInfo) { if (localUserInfo) {
resolve([[localUserInfo userInfo] copy]); resolve([[localUserInfo userInfo] copy]);
} else { } else {
resolve([_bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]); resolve([self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] copy]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment