mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-02-24 04:22:49 +08:00
These notifications are objects so their address always evaluates to true.
This commit is contained in:
parent
a34791c6ec
commit
5aac2609ce
@ -118,7 +118,7 @@
|
||||
[self.internetReach startNotifier];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:)
|
||||
name:kReachabilityChangedNotification object:nil];
|
||||
if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) {
|
||||
if (UIApplicationDidEnterBackgroundNotification && UIApplicationWillEnterForegroundNotification) {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user