Check if a device has GPS and Location Service is active

Asked

Viewed 107 times

2

I need to check if the iPad I’m using has GPS and if the app’s location service is active while using the app, how can I get this information?

1 answer

2


Using the class CLLocationManager you can use the method locationServicesEnabled, that a value is returned BOOL.

if (![CLLocationManager locationServicesEnabled]) {
    // Localização não habilitada
}

I believe that with this you get what you want.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.