[英]Running iOS app in background
我想定期将用户的当前纬度和经度发布到服务器。当应用程序在前台运行时,发布工作正常。但是如果应用程序在后台运行,有什么方法可以做到吗?
As far as I know you should not call any time consuming functions in applicationDidEnterBackground since the app will get suspended after a short amount of time.据我所知,您不应在 applicationDidEnterBackground 中调用任何耗时的函数,因为应用程序将在短时间内暂停。
From Apple's IOS Programming Guide来自 Apple 的 IOS 编程指南
Most applications that enter the background state are moved to the suspended state shortly thereafter.
大多数进入后台状态的应用程序在此后不久就会进入挂起状态。 While in this state, the application does not execute any code and may be removed from memory at any time.
在此状态下,应用程序不会执行任何代码,并且可以随时从内存中删除。 Applications that provide specific services to the user can request background execution time in order to provide those services.
向用户提供特定服务的应用程序可以请求后台执行时间以提供这些服务。
Maybe this's just what you're searching for?也许这正是您要寻找的?
http://mobile.tutsplus.com/tutorials/iphone/ios-multitasking-background-location/ http://mobile.tutsplus.com/tutorials/iphone/ios-multitasking-background-location/
AR Body detection AR身体检测
if the user does the correct move then a message shows to say that the move was correct if not then a message is sent to say that you didn't complete the move如果用户进行了正确的移动,则会显示一条消息,说明移动是正确的,如果不正确,则会发送一条消息,说明您没有完成移动
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.