开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜