Using CLRequireExplicitServiceSession correctly

I found this documentation that instructs you how to use CLServiceSession to defer any accidental/premature locacation permission prompts:

https://developer.apple.com/documentation/corelocation/suspending-authorization-requests

It says "Add the CLRequireExplicitServiceSession property to your app’s Info.plist file to opt into this control behavior."

I pretty much followed this example to a T. It seemed to work, however in some cases I still manage to get a location permission prompt on a fresh install before the part of the onboarding where we'd ask the user for location permissions (with CLServiceSession now).

Is there any additional information on using CLRequireExplicitServiceSession than this blurb? Googling brings up nothing. I presumed the property is a BOOL but I'm not even sure of that, as it doesn't show up in Info.plist's autocomplete suggestions and I have to manually set the type.

Thanks for the post.

In the url you shared here shows the note:

Add the CLRequireExplicitServiceSession property to your app’s Info.plist file to opt into this control behavior.

You are completely correct in the documentation does not give you the type as far as I can see CLRequireExplicitServiceSession looks like indeed a Boolean, and it should be set to YES (or true) in your Info.plist. But I think a bug for that documentation should be a good idea.

May I ask you to file a bug to improve that documentation?

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Is there anything you need to know besides the type?

Albert
  Worldwide Developer Relations.

Using CLRequireExplicitServiceSession correctly
 
 
Q