ios - Error: updates without prompting for location authorization -
ios - Error: updates without prompting for location authorization -
2015-04-07 13:26:10.767 harita[1690:821533] trying start mapkit location updates without prompting location authorization. must phone call -[cllocationmanager requestwheninuseauthorization] or -[cllocationmanager requestalwaysauthorization] first.
in ios8 have write below code
self.locationmanager = [[cllocationmanager alloc] init]; self.locationmanager.desiredaccuracy = kcllocationaccuracyhundredmeters; // code check if app can respond new selector found in ios 8. if so, request it. if([self.locationmanager respondstoselector:@selector(requestalwaysauthorization)]) { [self.locationmanager requestalwaysauthorization]; // or [self.locationmanager requestwheninuseauthorization]; } [self.locationmanager startupdatinglocation];
and have add together nslocationalwaysusagedescription , message want display app in plist file.
check tutorial http://www.devfright.com/ios-6-core-location-tutorial/
ios
Comments
Post a Comment