Fixed CB-497 - online and offline events are not being fired in 1.6.0
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/0db555b2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/0db555b2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/0db555b2 Branch: refs/heads/1.6.1 Commit: 0db555b2b2e6ed184d0494d2b28f251059c72a18 Parents: e4355f1 Author: Shazron Abdullah <shaz...@apache.org> Authored: Fri Apr 13 07:07:20 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Fri Apr 13 07:07:20 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVConnection.m | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/0db555b2/CordovaLib/Classes/CDVConnection.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVConnection.m b/CordovaLib/Classes/CDVConnection.m index f3bd758..902fab2 100644 --- a/CordovaLib/Classes/CDVConnection.m +++ b/CordovaLib/Classes/CDVConnection.m @@ -100,9 +100,9 @@ NetworkStatus status = [self.internetReach currentReachabilityStatus]; BOOL online = (status == ReachableViaWiFi) || (status == ReachableViaWWAN); if (online) { - [super writeJavascript:@"Cordova.fireDocumentEvent('online');"]; + [super writeJavascript:@"cordova.fireDocumentEvent('online');"]; } else { - [super writeJavascript:@"Cordova.fireDocumentEvent('offline');"]; + [super writeJavascript:@"cordova.fireDocumentEvent('offline');"]; } }