开发者

iPhone: Find out where am I when application is in background

开发者 https://www.devze.com 2023-03-22 13:50 出处:网络
I can get the current location of my iPhone b开发者_StackOverflow社区ut I was wondering if it is possible to call my methods when application is in background and pop-up message(may be using local not

I can get the current location of my iPhone b开发者_StackOverflow社区ut I was wondering if it is possible to call my methods when application is in background and pop-up message(may be using local notification?) if user has reached at particular location.

Thanks.


Yes, this is possible. A local notification is also an excellent solution.

All you need to do is to set the flags for background position updates in the app plist. Then, in the callback methods for the location manager, perform the distance and/or location tracking logging and fire a local notification.

0

精彩评论

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