Skip to content

Commit 5c24ac4

Browse files
committed
CB-8659: ios: 4.0.x Compatibility: Remove use of initWebView method
1 parent 4fc6d57 commit 5c24ac4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/ios/CDVLocation.m

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,13 @@ @implementation CDVLocation
5353

5454
@synthesize locationManager, locationData;
5555

56-
- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView
56+
- (void)pluginInitialize
5757
{
58-
self = (CDVLocation*)[super initWithWebView:(UIWebView*)theWebView];
59-
if (self) {
60-
self.locationManager = [[CLLocationManager alloc] init];
61-
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
62-
__locationStarted = NO;
63-
__highAccuracyEnabled = NO;
64-
self.locationData = nil;
65-
}
66-
return self;
58+
self.locationManager = [[CLLocationManager alloc] init];
59+
self.locationManager.delegate = self; // Tells the location manager to send updates to this object
60+
__locationStarted = NO;
61+
__highAccuracyEnabled = NO;
62+
self.locationData = nil;
6763
}
6864

6965
- (BOOL)isAuthorized

0 commit comments

Comments
 (0)