Will ios terminate the app running in background after a specific time?(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会在特定时间后终止在后台运行的应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ios会在特定时间后终止在后台运行的应用程序吗


- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01