Airplane Mode in the iOS Simulator
The iOS Simulator has no Airplane Mode switch. It uses your Mac’s network, so to test offline you have to cut the network somewhere else. Here are four ways to do it, and what your app actually sees with each one.
| Method | What your app sees | Side effects |
|---|---|---|
| Turn off the Mac’s Wi-Fi | Offline: requests fail and NWPathMonitor reports no network | Your whole Mac goes offline: browser, Slack, Xcode, your AI agent |
| Network Link Conditioner, 100% Loss | Requests hang until they time out; NWPathMonitor still reports a network | Slows down the whole Mac |
| xcrun simctl status_bar | Nothing. It only changes the status bar icons | None, but it doesn’t test anything |
| Lagsmith Airplane Mode | Offline like a real device, for that one app | None. Everything else stays online |
1. Turn off your Mac’s Wi-Fi
The closest thing to Airplane Mode with Apple’s tools. The simulator loses its network, URLSession requests fail with “The Internet connection appears to be offline”, and NWPathMonitor reports the path as unsatisfied.
The catch: your whole Mac is offline too. You can’t read docs, Xcode can’t download anything, and an AI coding agent running the test loses its own connection. If the Mac also has Ethernet or a tethered iPhone, the simulator keeps using those, so disconnect them as well.
2. Network Link Conditioner’s 100% Loss profile
If you have Network Link Conditioner installed, its 100% Loss profile drops every packet. That isn’t the same as being offline:
- Requests don’t fail straight away. They hang until they time out, 60 seconds by default.
NWPathMonitorandSCNetworkReachabilitystill report a network, because the interface is up.
That’s a useful test in its own right (a network that looks alive but isn’t, like a captive portal), but it won’t show your app’s “You’re offline” screen. And it slows down the whole Mac.
3. simctl status_bar is only for screenshots
xcrun simctl status_bar booted override --dataNetwork hide --wifiBars 0 This turns up a lot in search results, but it only changes the status bar icons. The app’s network is untouched. Use it for App Store screenshots, not offline testing.
4. Airplane Mode for one app with Lagsmith
Lagsmith puts a single simulator app in Airplane Mode while the rest of your Mac stays online. For simulator apps launched with request monitoring, it behaves like a real device:
- requests fail with “The Internet connection appears to be offline”,
NWPathMonitorreports no network, so you can test your path-update handling in the simulator,SCNetworkReachabilityreports no network, so Alamofire’sNetworkReachabilityManagerand Reachability.swift see it too.
Turn it off and your app sees the network come back, so you can test reconnecting too. Everything else on your Mac, including Xcode and your other simulator apps, stays online.
What to test while offline
- Launching offline. Does the first screen show cached content or a useful empty state, or a spinner that never stops?
- Going offline mid-request. Does the request fail cleanly and offer a retry?
- Coming back online. Does the app notice and refresh on its own, or does the user have to pull to refresh?
- Saving while offline. Is a post or edit kept and sent later, or lost?
Test the in-between states too
Real networks rarely go cleanly offline. Lagsmith can also:
- refuse a percentage of connections,
- time out every request,
- drop connections after a number of seconds,
- go offline and come back repeatedly, to test retries and reconnection,
- take a single endpoint offline while the rest works,
- make the network slow instead of gone.
Automate offline tests
Set Airplane Mode from an XCTest UI test before launching the app, or let an AI agent do it through the MCP server. Automation docs · AI agents.
Frequently asked questions
Does the iOS Simulator have Airplane Mode?
No. The Settings app in the iOS Simulator has no Airplane Mode switch, and the simulator shares the Mac’s network. The usual workaround is turning off the Mac’s Wi-Fi. Lagsmith puts a single simulator app in Airplane Mode instead.
Why does my app still think it’s online with Network Link Conditioner’s 100% Loss profile?
Because the network interface is still up. Packet loss makes requests hang until they time out, but NWPathMonitor and SCNetworkReachability only check that a route exists, and it does.
Does simctl status_bar turn off the network?
No. xcrun simctl status_bar only overrides the status bar icons, for screenshots. The app’s network is unchanged.
Will NWPathMonitor report no network with Lagsmith?
Yes, for simulator apps launched with request monitoring. NWPathMonitor and SCNetworkReachability (used by Alamofire and Reachability.swift) report no network, like on a real device.
What error do requests fail with?
URLSession requests fail with “The Internet connection appears to be offline” (NSURLErrorNotConnectedToInternet, −1009), the same error a real device gives in Airplane Mode.
Can I simulate a flaky connection instead of fully offline?
Yes. Lagsmith can refuse a percentage of connections, time out requests, drop connections after N seconds, or go offline and back repeatedly.
Free download with a 14-day Pro trial. No account, no card. macOS 13 Ventura or later.