Programmatically check whether GPS is enabled or not on iPhone

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

Upvotes: 9

Views: 10576

Answers (1)

Alex Koloskov
Alex Koloskov

Reputation: 820

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.

Upvotes: 27

Related Questions