Abhinav
Abhinav

Reputation: 38142

Location services

I have in plenty of Core Location based apps that before triggering the code for location services an alert pop up and warns user that the app is going to use their current location. Is this a in-built feature of Core Location or we need to implement it before calling API?

Upvotes: 0

Views: 523

Answers (2)

bioffe
bioffe

Reputation: 6383

Yes. It's built-in. As of iOS4 you can modify the text body for this alert specifically for your app.

Follow this link http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/doc/uid/TP40007125

and find purpose property in the doc.

Upvotes: 4

eliah
eliah

Reputation: 2277

This is built-in. When you try to call core location methods, if the user hasn't allowed your app to do so before, the OS will automatically pop an alert.

Upvotes: 1

Related Questions