Why background task is ending after 10 minutes

混江龙づ霸主 提交于 2019-12-04 21:02:52

Have you added voip as a background mode to the UIBackgroundModes key in your application Info.plist file?

There may be a possibility that your app is crashing because of many requests in background.I hope that you already followed these steps:

There are several requirements for implementing a VoIP app:

  • Add the UIBackgroundModes key to your app’s Info.plist file. Set the value of this key to an array that includes the voip string.

    • Configure one of the app’s sockets for VoIP usage.

    • Before moving to the background, call the

    • setKeepAliveTimeout:handler: method to install a handler to be
    • executed periodically. Your app can use this handler to maintain its service connection.

    • Configure your audio session to handle transitions to and from active use.

    To ensure a better user experience on iPhone, use the Core Telephony framework to adjust your behavior in relation to cell-based phone calls; see Core Telephony Framework Reference.

  • To ensure good performance for your VoIP app, use the System Configuration framework to detect network changes and allow your app to sleep as much as possible.

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