Need help accessing local network server from XCUITest

Hi,

Our iOS App have a XCUITest. XCUITest connects to a server located in the local network. We observing that when we use iOS14 iPhone device the XCUITest in question can't access the server.
The error we see is consistent with error you would see when user did not granted or denied local network access permission. The error is "internet is offline". In Settings iOS App->Privacy->Local Network displays empty view, no Apps are listed here after we run the XCUITest. I would expect TestRunner App should appear here but it does not.

Connection works fine when we use iOS12 or iOS13 iPhone.

Do you have ideas how to fix or workaround the issue?

Thanks.

Connection works fine when we use iOS12 or iOS13 iPhone.

Do you have ideas how to fix or workaround the issue?

This is a known issue. I am tracking (r. 73701876) currently that is suffering from the exact same issue. I would open a bug report regarding this issue and make sure to reference the bug number I included here as relating to this issue.

<https://developer.apple.com/bug-reporting/>

Please make sure to follow up with the Feedback ID.

The only workaround I can recommend is putting this testing data on a secure server that is not recognized as a local network. For more information and what types of constitutes local network access, see this post here.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Need help accessing local network server from XCUITest
 
 
Q