开发者

How to get current Location when the app is running in background

I want to get reference that, How 开发者_JAVA百科can we find out current Latitude and Longitude when our application is running in background..

If you have any suggestion then please suggest me...

Thanks in advance.


Well first you need to tell iOS that your app will run in background with for retrieving the user location.

Do this by adding the Required background modes to the info.plist and set one item to App registers for location updates

The just set up the CLLocationManager to start monitoring location changes. Apple does suggest that your app only use significant changes to save battery: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW6

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜