Cllocationmanager and Tvos - Requestwheninuseauthorization() Not Prompting

tvos Location Services prompt never prompted

It turns out my info.plist needed CFBundleDisplayName in order to show the location services prompt. Adding this enabled the ability to prompt the user.

CLLocationManager not prompting the user and returns NULL

Replying to myself. I was using testflighapp.com for beta testing and I am not sure if that was causing it, but all I had to do was go ti iPhone-->Settings-->General-->Reset-->Reset Location Warnings.

Once I did that and ran my app, it did prompt me for GPS and everything started working fine after that.

how to request auth for CLLocationManager on macOS

According to the Core Location Best Practices WWDC 2016 session,

For macOS, we only support always authorization. Furthermore, Core
Location will automatically display a prompt when you attempt to
access location information.

You don't need to call requestAlwaysAuthorization on macOS.

Don't forget to turn on "Location" under the "App Sandbox" capability for your target. Also, in my tests, the prompt was only shown the first time the app was run.



Related Topics



Leave a reply



Submit