diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm index 7587839290e..3f85dd833eb 100644 --- a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm @@ -215,6 +215,11 @@ - (void) stopHeading - (bool) startLocation { + if (locationManager.authorizationStatus == kCLAuthorizationStatusNotDetermined) { + // Request permission when in use or always + [locationManager requestWhenInUseAuthorization]; // or requestAlwaysAuthorization + } + if([CLLocationManager locationServicesEnabled]) { [locationManager startUpdatingLocation];