Description: We are investigating an issue where running a specific e-commerce iOS app inside the Xcode Simulator intermittently disrupts the Mac’s network connectivity.
When the app is launched in the Simulator, our NETransparentProxyProvider and NEFilterDataProvider extensions occasionally stop receiving traffic correctly, and shortly afterward the entire macOS DNS resolution fails. Once this happens, all apps on the Mac lose internet access until mac is restarted. Disabling extensions also fixing the issue.
This issue only appears when the app runs in the Xcode Simulator.
I would like to confirm:
- Is it possible for traffic patterns or network behavior inside the Simulator to interfere with system-level Network Extension providers on macOS?
- Are there known limitations or conflicts between the Simulator’s virtual networking interfaces and Network Extensions?
- Any recommended debugging steps or best practices to isolate this behavior?
Any guidance, known issues, or suggestions would be appreciated.
In general, the simulator uses the host’s TCP/IP implementation. So, for example, if you use URLSession to run a request in the simulator, that’ll use the simulator’s CFNetwork which uses the simulator’s Network framework which uses BSD Sockets which ends up in the host kernel. From there, the simulator looks like any other (big) BSD Sockets client.
As to why it’s causing the host’s networking stack to fail, I’ve got no good theories. However, I suspect it’s somehow tied to your NE providers, because if this were failing in general there’d be a lot more grumbling. But that doesn’t mean that your NE providers are at fault. It could just as easily be a latent system bug that happens to be triggered by your NE providers.
How reproducible is this?
If you can reproduce it reasonably reliably, one option would be to replace your NE providers with simple ‘pass through’ versions. If the problem persists, then that’d form a good basis of a bug report. Alternatively, if that eliminates the problem then you have something to actually debug.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"