开发者

iPhone SDK multitasking with CoreLocation

开发者 https://www.devze.com 2023-02-10 16:39 出处:网络
I am developing an iPhone app which uses CoreLocation. I\'m having trouble finding out if the CoreLocation location continues to get updated when the app enters the background. I would like to have it

I am developing an iPhone app which uses CoreLocation. I'm having trouble finding out if the CoreLocation location continues to get updated when the app enters the background. I would like to have it stop开发者_如何学编程 updating, but I am not sure if I need to explicitly tell it to stop or not.

Could anyone shed some light on this?


You need to explicitly set whether your application will run in background mode. As documentation says Background Execution

Also you notice an icon in status bar will disappear when core location stops updating location data when your app. go to background mode


Kindly check the following url .. hope it is useful to you

http://numiko.com/labs/?p=238


As with most things, programming related; if you want an action to occur, you almost always need to tell it to do that thing, or an ancillary thing which side effects that.

If you want it to stop updating, tell it to do so. (And yes, there are two different modes that will collect location info in the background. One is only on the iPhone 4 though.)

0

精彩评论

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