简体   繁体   English

要求iPhone 4将地理标记信息发送回后台服务器

[英]Ask iPhone 4 to send back geotag information to server on the background

I wonder if it is possible for iPhone 4: 我想知道iPhone 4是否可行:

I have a server which sends queries about the location of the phone (irregularly) via an iPhone app. 我有一台服务器,通过iPhone应用程序(不定期)发送有关手机位置的查询。 Customer can choose a setting that allow the phone to send back geotag information (longitude and lattitude) in the background (without customers doing anything). 客户可以选择一种设置,以允许电话在后台发送回地理标记信息(经度和纬度)(客户无需执行任何操作)。

If it is possible, how should I do it? 如果有可能,我应该怎么做? If not, what is the closest alternative available? 如果没有,最接近的替代方法是什么?

Thank you. 谢谢。

Yes, you can do this. 是的,您可以这样做。 You have to set the UIBackgroundModes flag in your Info.plist to indicate that you execute in the background. 您必须在Info.plist中设置UIBackgroundModes标志,以指示您在后台执行。

See: Information Property List Keys 请参阅: 信息属性列表键

Note that running the GPS from the background will severely impact battery life. 请注意,从后台运行GPS将严重影响电池寿命。 In addition your application may be terminated at any time if the system needs the memory. 此外,如果系统需要内存,则您的应用程序可能随时终止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM