Description:
Using the Network
framework, SDDP discovery will fail while 3rd party apps are running in the background
The 3rd party apps in question are (presumably) using the CocoaAsyncSocket library to perform SSDP discoveries on WiFi.
How to reproduce
Test Setup:
For the 3rd party app, you can use https://apps.apple.com/us/app/web-video-cast-browser-to-tv/id1400866497
The simplistic test app referenced below can be installed from: https://github.com/tifroz/SSDPTest
You must have the multicast entitlement (https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_networking_multicast)
Test steps:
- On the test device, install a 3rd party app that uses the CocoaAsyncSocket library to performs SSDPdiscovery.
- Restart the test device to clear any existing 3rd party apps/processes
- Run this test app on the device, the status should be
ready
- Kill the test app
- Start the 3rd party app that uses the CocoaAsyncSocket library, then send it to the background (without killing it) after a few seconds
- Start the test app, this time the status should be
(failed, address already in use)
- Optionally, kill the test app + the 3rd party app, then start the test app again (status should be
ready)
Question:
Is there a workaround?