iOS 7 - 长时间运行的后台任务 [英] iOS 7 - Long running background task

查看:101
本文介绍了iOS 7 - 长时间运行的后台任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似于 iOS长时间运行的背景计时器,其中包含location背景模式但不完全。

我们的应用程序需要在后台发送偶尔的地理位置数据。在前景中工作正常,但它当然会在3分钟后终止。所以我需要实现这样的东西。有没有人用C#做过这个,如果有的话,你愿意分享吗?

Our app needs to send occasional geolocation data in the background. Works fine in foreground but it, of course, gets terminated after 3 minutes. So I need to implement something like this. Has anyone done this in C# and, if so, would you be willing to share?

https://stackoverflow.com/a/18962839/462935

谢谢!

推荐答案

您只能在重要的位置更改时唤醒您的应用。请在应用处于后台状态时查看 CLLocationManager

You can only have your app wake up on significant location changes. Please see CLLocationManager while app is in background state.

您无法在后台无限期地运行您的应用程序,这是iOS设计中最小功耗的一部分。最好阅读关于 App的Apple文档。状态和多任务处理

You cannot simply run your app in the background indefinitely, which is part of iOS's design for minimal power usage. It would be good to read Apple's documentation on App State and Multitasking.

这篇关于iOS 7 - 长时间运行的后台任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆