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?
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.
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.
精彩评论