You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2015/03/13 15:45:19 UTC

cordova-plugin-battery-status git commit: CB-8659: ios: 4.0.x Compatibility: Remove use of initWithWebView method

Repository: cordova-plugin-battery-status
Updated Branches:
  refs/heads/master 72c46483b -> 50fd63d19


CB-8659: ios: 4.0.x Compatibility: Remove use of initWithWebView method


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/commit/50fd63d1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/tree/50fd63d1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/diff/50fd63d1

Branch: refs/heads/master
Commit: 50fd63d192a01fa2b76515714943fda44e67ef1d
Parents: 72c4648
Author: Ian Clelland <ic...@chromium.org>
Authored: Fri Mar 13 10:43:54 2015 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Mar 13 10:44:32 2015 -0400

----------------------------------------------------------------------
 src/ios/CDVBattery.m | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/50fd63d1/src/ios/CDVBattery.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVBattery.m b/src/ios/CDVBattery.m
index 681511c..e2f162b 100644
--- a/src/ios/CDVBattery.m
+++ b/src/ios/CDVBattery.m
@@ -129,14 +129,10 @@
     [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceBatteryLevelDidChangeNotification object:nil];
 }
 
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
+- (void)pluginInitialize
 {
-    self = (CDVBattery*)[super initWithWebView:theWebView];
-    if (self) {
-        self.state = UIDeviceBatteryStateUnknown;
-        self.level = -1.0;
-    }
-    return self;
+    self.state = UIDeviceBatteryStateUnknown;
+    self.level = -1.0;
 }
 
 - (void)dealloc


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org