diff --git a/ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.m b/ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.m index c08f582b..f8ff3efd 100644 --- a/ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.m +++ b/ios/RCTJPushModule/RCTJPushModule/RCTJPushModule.m @@ -49,6 +49,9 @@ - (id)init { _isJPushDidLogin = NO; NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter]; + + [defaultCenter removeObserver:self]; + [defaultCenter addObserver:self selector:@selector(networkDidSetup:) name:kJPFNetworkDidSetupNotification diff --git a/package.json b/package.json index 48afbd0e..69307608 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jpush-react-native", - "version": "1.4.5", + "version": "1.4.6", "description": "a jpush plugin for react native application", "main": "index.js", "scripts": {