Re: MapKit location authorization
Re: MapKit location authorization
- Subject: Re: MapKit location authorization
- From: Roland King <email@hidden>
- Date: Fri, 19 Sep 2014 21:21:32 +0800
> On 19 Sep 2014, at 8:59 pm, Gerriet M. Denkmann <email@hidden> wrote:
>
> My iOS app running on 8.0 says:
> "Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first."
>
> Two questions:
> 1. where is requestWhenInUseAuthorization documented?
In the documentation for CLLocationManager, for iOS, not OSX. It’s worth remembering at this point the recent conversations on the Xcode list about how the documentation for Xcode is entirely borked, not coming from what’s local on the box and showing anything it feels like whether you ask for OSX or iOS, you’re probably looking at the OSX one even though you didn’t ask for it. use google, or Dash.
>
> 2. Where am I "trying to start MapKit location updates" ? I don't do this knowingly.
> Or qualifies the mere usage of MapKit as "trying to start MapKit location updates”?
I have no idea. What are you doing which uses maps, or core location?
>
> Where or when should I ask for authorisation? AppDidFinishLunching?
Avoiding the obvious joke about apps being happy after they have finished lunch ..
That would be exactly the place Apple recommends you *don’t* ask for it. Possibly, very possibly if you were asking for requestAlwaysAuthorization it might be a place to do it, but the recommendation is never to ask for blanket permission at the start of an app before the user has a clue why you want it, but ask only at or around the point they have requested something which they will understand is the cause of your app asking for permission. Else they normally either say no or say no, delete your app and give it a one-star rating. So you need to figure out what it is you’re doing which triggers the request and ask in response to a user action.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden