-->

iPhone VOIP in background

2020-07-30 03:25发布

问题:

I am developing an iPhone application that communicates with a non iOS device through Wi-Fi. My application is using VOIP.I have configured the streams and added the necessary UIBackgroundModes into my plist .

The problem is that the application is not receiving any information from the external device, When it enters in background.

Could somebody tell me if I am missing something?

回答1:

Not sure about actual problem.

Make sure following As per iOS background VOIP application it will allow only TCP connection to be alive & communicable in background.

So if you/your stack use UDP socket for VOIP then replace it with TCP.

In case of UDP port remain bind with your application, but it is inactive in background mode & become active in foreground mode.



回答2:

I am assuming that you set the Required background modes in the plist based on your statement correctly. That the array is set the key and the required value for audio and voip. Also do you have the key "application does not run in the background" added to the plist and set to NO.