From 5aac2609ceafcdcb0a746dd54bb21899a2f90a7a Mon Sep 17 00:00:00 2001 From: Perry Stoll Date: Mon, 5 Oct 2015 10:51:02 -0400 Subject: [PATCH] These notifications are objects so their address always evaluates to true. --- src/ios/CDVConnection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVConnection.m b/src/ios/CDVConnection.m index 3749767..223dd7c 100644 --- a/src/ios/CDVConnection.m +++ b/src/ios/CDVConnection.m @@ -118,7 +118,7 @@ - (void)pluginInitialize [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]; }