UILocalNotification does not fire after 10 minutes in background

六月ゝ 毕业季﹏ 提交于 2019-11-29 08:56:33

It sounds like you have a VoIP socket that you are receiving the call on, so rather than looping and polling for call state, you can just present the local notification at the point that you read the data off the socket.

If the VoIP control socket is TCP, and marked with the appropriate ...NetworkServiceTypeVoIP key, your app will automatically get woken up from suspension for 10 seconds, at which point you can present the local notification.

See Configuring Sockets for VoIP Usage for more information.

Once that is done, all of the code that you shared above can be removed.

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