Skip to content

Commit e88f36e

Browse files
fix(iOS): update to CoreLocation authorization request (#8309)
Co-authored-by: alexandre burton <[email protected]>
1 parent 7eac11b commit e88f36e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ - (void) stopHeading
215215

216216
- (bool) startLocation
217217
{
218+
if (locationManager.authorizationStatus == kCLAuthorizationStatusNotDetermined) {
219+
// Request permission when in use or always
220+
[locationManager requestWhenInUseAuthorization]; // or requestAlwaysAuthorization
221+
}
222+
218223
if([CLLocationManager locationServicesEnabled])
219224
{
220225
[locationManager startUpdatingLocation];

0 commit comments

Comments
 (0)