CB-8659: ios: 4.0.x Compatibility: Remove use of initWebView method
diff --git a/src/ios/CDVCompass.m b/src/ios/CDVCompass.m
index 08064c9..ebe6b60 100644
--- a/src/ios/CDVCompass.m
+++ b/src/ios/CDVCompass.m
@@ -56,17 +56,13 @@
@synthesize locationManager, headingData;
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
+- (void)pluginInitialize
{
- self = (CDVCompass*)[super initWithWebView:(UIWebView*)theWebView];
- if (self) {
- self.locationManager = [[CLLocationManager alloc] init];
- self.locationManager.delegate = self; // Tells the location manager to send updates to this object
- __locationStarted = NO;
- __highAccuracyEnabled = NO;
- self.headingData = nil;
- }
- return self;
+ self.locationManager = [[CLLocationManager alloc] init];
+ self.locationManager.delegate = self; // Tells the location manager to send updates to this object
+ __locationStarted = NO;
+ __highAccuracyEnabled = NO;
+ self.headingData = nil;
}
- (BOOL)hasHeadingSupport