tags:

views:

35

answers:

2

For some reason, my iPhone app doesn't ask the user for permission to use their current location when the app is installed from the App Store. Because of this, my app's location-based functionality doesn't work. I'd like to catch the error and re-trigger the functionality that asks the user for permission to use their current location.

Is there a way to re-trigger asking the user if the iPhone can use their current location?

A: 

They most likely have location services completely turned off in Settings or even have it off just for your application.

You can use:

[CLLocationManager locationServicesEnabled]

to check this and alert the user or track it for your own purposes. Core Location should ask the user to enable Location Services in the case of the first scenario. If the second scenario is happening, then there is nothing you can do except tell the user to turn on location services for your app.

There is really nothing you can do programmatically outside of the CLLocationManager handling all of this for you.

bstahlhood
Thanks, bstahlhood. Unfortunately, Location Services doesn't ask the user for some reason.
BeachRunnerJoe