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

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -