Post

Replies

Boosts

Views

Activity

Reply to Enable local network access during iOS UI test in iOS14
Hi Matt, Thank you for your response. I have tried only setting the NSLocalNetworkUsageDescription key in my test target's Info.plist (no more entries for NSBonjourServices or NSAllowsArbitraryLoads). My test code now simply executes a URLSession.dataTask to a local endpoint via http. However, I do not get the local network usage prompt when running the test, and the network call fails with the same error as before. I removed the test app before running to make sure the value was not cached. Can you tell me what code you wrote in your test that triggered the prompt? And just to be sure: the prompt will be triggered by the test app, not the actual app under test, right? Also, the Info.plist of the app under test can remain untouched? Kind regards, Ejnar
Dec ’20