VOIP app is not wake up in time if set 15 min for setKeepAliveTimeout method

可紊 提交于 2019-11-30 07:41:52

setKeepAliveTimeout:handler: is not a general purpose interval scheduler. It allows you to set the maximum interval between invocations of the supplied handler. The purpose of the function is to help you keep your connections from timing out or falling behind your VOIP applications standards (for things like online/away status).

So the first parameter (timeout) tells iOS to call your handler in no more than 15 minutes. If the OS decides that it's got some cycles to spare at 12 minutes, it might call your handler. Or in 7 minutes, or 15.

If you need finer grained control of the interval, you should set a smaller timeout window and just ignore invocations that aren't important to you. But the invocations will still going be fairly irregular.

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/setKeepAliveTimeout:handler:

In general, there is currently no way to make it wake your app on a precise schedule. You must adhere to iOS' limited background processing options, all of which are designed to give the OS a lot of leeway to manage overall priorities and resource needs across ALL processes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!