ios会在特定时间后终止在后台运行的应用程序吗? [英] Will ios terminate the app running in background after a specific time?

查看:21
本文介绍了ios会在特定时间后终止在后台运行的应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用核心位置框架,并在 UIBackgroundMode 或必需的背景模式(在 Xcode 4.2 中)中设置位置字符串,以便在应用程序在后台运行时从 didUpdateToLocation 方法获取更新的位置并通过点击核心位置框架的 didUpdateToLocation 方法中的特定链接将此更新的位置发送到服务器.

I am using core location framework inside my application and I set the location string in UIBackgroundMode or Required background modes(in Xcode 4.2) for getting the updated location from didUpdateToLocation method when app is running in background and also sending this updated location to server by hitting the specific link inside didUpdateToLocation method of core location framework.

我的问题是应用程序在后台运行一段时间后会终止吗?

My question is that will the app be terminated after some time when running in background or not?

推荐答案

不,没有为此定义具体时间.但是应用程序肯定会根据某些参数终止 - 电池消耗,内存占用问题等.

No, there is no specific time defined for this.But app will definitely terminate based upon certain parameter - battery drain, memory footprint issue etc.

在开发人员文档中明确提到-系统将暂停的应用程序尽可能长时间地保留在内存中,仅当可用内存量变低时才将其删除.保留在内存中意味着您的应用程序的后续启动要快得多."

In developer documentation it is clearly mentioned - "The system keeps suspended apps in memory for as long as possible, removing them only when the amount of free memory gets low. Remaining in memory means that subsequent launches of your app are much faster."

查看完整的详细信息 -http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

Go through this for complete details - http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

这篇关于ios会在特定时间后终止在后台运行的应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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