Why this happens
The iPhone Simulator shares the host Mac’s network stack. Unlike a physical device, it has no independent radio hardware or airplane-mode toggle in Settings. When you need to verify offline behavior, failed requests, or cached-data fallbacks, you must cut the simulator’s network access at the host level or shape traffic to zero bandwidth.
Apple does not expose a simulator-level airplane-mode switch in the Simulator UI or simctl. The two practical workarounds are disabling the Mac’s network interfaces entirely or using the Network Link Conditioner preference pane to throttle the simulator’s traffic to 0 kbps. The latter is reversible, scriptable, and leaves your Mac online for documentation lookup or CI logs.
How to fix it
1. Use Network Link Conditioner (recommended)
Network Link Conditioner (NLC) is a macOS preference pane that shapes traffic for any process, including the simulator. It ships in the Additional Tools for Xcode package.
- Open the Apple Developer Downloads page (developer.apple.com/download/all/) and sign in with your Apple ID.
- Search for Additional Tools for Xcode matching your Xcode version (e.g., “Additional Tools for Xcode 16”). Download the
.dmg. - Mount the image and double-click Network Link Conditioner.prefPane → Install → choose Current User or All Users.
- Open System Settings → Network Link Conditioner (or System Preferences on macOS ≤ 13).
- Click the + button to add a custom profile:
– Name:Airplane Mode
– Downlink / Uplink Bandwidth:0 kbps
– Downlink / Uplink Delay:0 ms
– Downlink / Uplink Loss:0 %
– Leave DNS and other fields at defaults. - Save the profile, then select it from the dropdown and flip the ON switch.
The simulator (and any other app) now sees zero throughput. Toggle OFF to restore normal speed.
Automate from the command line (useful in CI):
# Enable the saved "Airplane Mode" profile
sudo nlcutil activate "Airplane Mode"
# Disable
sudo nlcutil deactivate
nlcutillives in/usr/local/binafter the pref-pane install. On Apple Silicon Macs you may need to runsudo xattr -rd com.apple.quarantine /Library/PreferencePanes/Network\ Link\ Conditioner.prefPaneonce.
2. Disable the Mac’s network connection (quick ad-hoc)
If you only need a one-off test and don’t mind taking your whole Mac offline:
- Click the Wi-Fi or Ethernet icon in the menu bar.
- Choose Turn Wi-Fi Off or Disconnect the Ethernet cable.
- The simulator immediately loses connectivity.
- Re-enable when done.
Downside: Your Mac cannot reach Git, package registries, or documentation while testing.
3. Simulate per-app with networksetup (advanced)
On macOS 13+ you can create a dedicated network location with no active services and switch the simulator process into it via networksetup -switchtolocation. This is more involved and rarely needed; NLC remains simpler.
How to prevent it
- Keep a named NLC profile called “Airplane Mode” so you can toggle it in one click.
- Add
nlcutil activate "Airplane Mode"/deactivatesteps to your CI scripts for automated offline tests. - Document the profile name in your project’s
TESTING.mdso new team members find it. - Avoid disabling the Mac’s Wi-Fi during pair-programming or when running a local backend the simulator talks to.
FAQ
Does the Simulator have a built-in airplane-mode toggle in iOS 17 or later?
No. The Settings app in the simulator shows Airplane Mode but the switch is non-functional; it does not affect the host network stack.
Can I simulate airplane mode only for my app while keeping Safari online?
Network Link Conditioner applies system-wide. To isolate a single process you would need a per-process network filter (e.g., pf rules bound to the simulator’s PID), which is fragile. The standard practice is to accept the brief system-wide throttle or run the simulator on a dedicated CI runner.
Will simctl ever support simctl network airplane-mode?
Apple has not announced such a subcommand. The current simctl network tools (simctl spawn booted networksetup …) only query the host; they cannot create a virtual interface for the simulator alone.
Parts of this guide are adapted from content licensed under CC BY-SA 2.5; this article is shared under the same license.
