开发者

Iphone, how save coordinate gps in background? [duplicate]

开发者 https://www.devze.com 2023-02-15 13:23 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: Is background GPS\\location logging possible on iPhone 4 or 3GS running on开发者_如何学C iOS4
This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

Is background GPS\location logging possible on iPhone 4 or 3GS running on开发者_如何学C iOS4

I want to save the GPS coordinates when the application goes into background mode, how can i do? thanks!!


If you're interested in getting Core Location updates while in the background, you might wanna check the significant location changes service and the region monitoring service in Core Location (only available in iPhone 4, and probably iPad 2 with 3G). You can also opt to receive regular GPS location updates in the background by including location in the UIBackgroundModes array of your Info.plist.

If you're just interested in saving the last location before your app was sent to the background, just save the latitude and longitude in NSUserDefaults.

0

精彩评论

暂无评论...
验证码 换一张
取 消