简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM