开发者

iPhone tracking distance in the background

开发者 https://www.devze.com 2023-01-29 03:34 出处:网络
I was wondering, before learning the whole iPhone development stack, whether it was possible to even write an application in iOS 4 that can sit in the background and tell the user when certain geo-loc

I was wondering, before learning the whole iPhone development stack, whether it was possible to even write an application in iOS 4 that can sit in the background and tell the user when certain geo-location events have happened? For example, tell a jogger once he has traveled 4 开发者_开发问答miles, but without having to have the application always open?

Thanks!


Yes, this is perfectly possible on iOS 4.x devices. (It's one of the selling points - see the "Background location" section within the What's New in iOS4 blurb.)

If you want to take a look behind the hood, checkout the CLLocationManager Class Reference and the "Executing Code in the Background" section of the iOS Application Programming Guide.

0

精彩评论

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