問題描述
我在我的應用程序中使用核心位置框架,并在 UIBackgroundMode 或必需的背景模式(在 Xcode 4.2 中)中設置位置字符串,以便在應用程序在后臺運行時從 didUpdateToLocation
方法獲取更新的位置并通過點擊核心位置框架的 didUpdateToLocation
方法中的特定鏈接將此更新的位置發(fā)送到服務器.
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?
推薦答案
不,沒有為此定義具體時間.但是應用程序肯定會根據(jù)某些參數(shù)終止 - 電池消耗,內(nèi)存占用問題等.
No, there is no specific time defined for this.But app will definitely terminate based upon certain parameter - battery drain, memory footprint issue etc.
在開發(fā)人員文檔中明確提到-系統(tǒng)將暫停的應用程序盡可能長時間地保留在內(nèi)存中,僅當可用內(nèi)存量變低時才將其刪除.保留在內(nèi)存中意味著您的應用程序的后續(xù)啟動要快得多."
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會在特定時間后終止在后臺運行的應用程序嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!