ios - Continous "Allow "App" to access your location while you use the app" alerts -


i have developed app trying current device location in delegate method "applicationdidbecomeactive" , working fine, issue came when tested same code on xcode 8 beta 6 , ios beta 10.7. screen bombarded continous alerts saying "allow "app" access location while use app". not able click on "allow"/"don't allow". code is:

-(void) startlocationservice { clauthorizationstatus status = [cllocationmanager authorizationstatus];  if (![cllocationmanager locationservicesenabled] || status == kclauthorizationstatusdenied || status == kclauthorizationstatusrestricted) {     dlog(@"locations disabled or status not permiting use of locations systems.");     self.currentlocation = nil;     [self sendnotificationforerrormessage:error_msg_location_service]; } else {     [self createlocationmanager];      if ([locationmanager respondstoselector:@selector(requestwheninuseauthorization)]) {         if (status == kclauthorizationstatusnotdetermined) {             [locationmanager requestwheninuseauthorization];         }     }     else {         [self startlocationmanager];     } } }  -(void)createlocationmanager { self.currentlocation = nil; locationmanager = [[cllocationmanager alloc] init]; locationmanager.desiredaccuracy = kcllocationaccuracynearesttenmeters; locationmanager.delegate = self; }  -(void)startlocationmanager { [locationmanager startupdatinglocation]; [self performselector:@selector(locationservicetimedout)            withobject:nil            afterdelay:timeoutvalue]; } 

scenarios have tested: 1) compiled app in xcode8 beta6 , ran on ios 9 device 2) compiled app in xcode8 beta6 , got bombarded alerts on ios10 device.

i have tried googling no luck. pointer highly appreciated.

try this

go info.plist

add key

privacy - location usage description 

or

privacy - location usage description 

or

privacy - location when in use usage description 

add description right.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -