简体   繁体   English

在后台运行 iOS 应用

[英]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.向用户提供特定服务的应用程序可以请求后台执行时间以提供这些服务。

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.

相关问题 在后台运行的iOS应用 - iOS app running in the background ios应用程序,在后台运行时运行加速度计 - ios app, running accelerometer while the app is in the background 以编程方式阻止应用程序在后台运行 iOS - programmatically prevent app from running in background iOS 应用程序未运行时的iOS 7后台获取 - iOS 7 Background Fetch When the App is Not Running 当应用程序在后台运行时,在iOS应用程序的锁定屏幕上添加图像 - Add image on lock screen in iOS app, when app is running in background 如果您不发布到App Store,则在后台运行iOS应用 - Running an iOS app in the background if you aren't publishing to the App Store 当我的应用程序在ios中处于后台时,有没有办法检测正在运行的应用程序? - Is there a way to detect the running app, while my app is in the background in ios? iOS应用在后台运行时,iOS应用检测到解锁事件 - iOS app detects unlock event while App is running in background iOS:如果应用程序未在后台运行,则调用openURL会在启动时崩溃应用程序 - iOS : If app is not running in background,calling openURL crashes app on launch 当iphone应用程序在后台iOS4.0中运行时,AudioQueueStart失败 - AudioQueueStart fails when iphone app running in background iOS4.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM