Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically check whether GPS is enabled or not on iPhone

Tags:

iphone

gps

How can I check whether GPS is enabled or not on the iPhone?

like image 956
Krishna Chaitanya Bandaru Avatar asked Jan 30 '11 08:01

Krishna Chaitanya Bandaru


People also ask

How do I know if my location is enabled on my iPhone?

Go to Settings > Privacy > Location Services. Make sure that Location Services is on.

How to on Location Services on iPhone?

You can turn Location Services on or off at Settings > Privacy > Location Services. You can turn Location Services on either during the Setup Assistant process or later through the Location Services setting. You can individually control which apps and system services have access to Location Services data.

How do I turn on Location Services?

Open your phone's Settings app. Under "Personal," tap Location access. At the top of the screen, turn Access to my location on or off.


1 Answers

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html

[CLLocationManager locationServicesEnabled]

Returns a Boolean value indicating whether location services are enabled on the device.

like image 83
Alex Koloskov Avatar answered Dec 28 '22 23:12

Alex Koloskov