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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -