File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
ios/RNNeteaseIm/RNNeteaseIm Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1212
1313@implementation RNNeteaseIm
1414
15+ - (void )dealloc {
16+ [[NSNotificationCenter defaultCenter ]removeObserver:self ];
17+ }
18+
1519- (instancetype )init {
1620 if (self = [super init ]) {
1721
1822 }
1923 [self initController ];
24+ [[NSNotificationCenter defaultCenter ]addObserver:self selector: @selector (clickObserveNotification: ) name: @" ObservePushNotification" object: nil ];
2025 return self;
2126}
2227
28+ - (void )clickObserveNotification : (NSNotification *)noti {
29+ NSDictionary *dict = noti.object ;
30+ NSDictionary *param = [dict objectForKey: @" dict" ];
31+ if ([[dict objectForKey: @" type" ] isEqualToString: @" launch" ]) {
32+ [_bridge.eventDispatcher sendDeviceEventWithName: @" observeLaunchPushEvent" body: param];
33+ }else {
34+ [_bridge.eventDispatcher sendDeviceEventWithName: @" observeBackgroundPushEvent" body: param];
35+ }
36+ }
37+
38+
2339@synthesize bridge = _bridge;
2440- (dispatch_queue_t )methodQueue
2541{
You can’t perform that action at this time.
0 commit comments