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