Why this happens
The iPhone Simulator runs on your Mac and inherits its full-speed network connection by default. There’s no built-in simulator menu to degrade that connection, so apps always fetch data at LAN or Wi-Fi speeds. To reproduce real-world conditions — high latency, packet loss, or cellular-grade bandwidth — you need a system-level traffic shaper that sits between the simulator and the network stack.
Apple provides Network Link Conditioner (NLC) as part of the Additional Tools for Xcode package. It installs as a preference pane and applies kernel-level traffic shaping to all outbound and inbound packets, including those from the simulator. A third-party alternative, SpeedLimit, offers a menu-bar UI but hasn’t been updated since 2018 and may not work on current macOS versions.
How to fix it
1. Install Network Link Conditioner (recommended)
- Open Xcode.
- Choose Xcode ▸ Open Developer Tool ▸ More Developer Tools….
- Sign in with your Apple Developer account if prompted.
- Download Additional Tools for Xcode matching your Xcode version (e.g., “Additional Tools for Xcode 15”).
- Mount the
.dmg, open the Hardware folder, and double-click Network Link Conditioner.prefpane. - Click Install when macOS asks to add it to System Settings.
- Open System Settings ▸ Network Link Conditioner (near the bottom of the sidebar).
- Select a profile — 3G, Edge, High Latency DNS, or create a custom one — and toggle On.
Important: After a macOS upgrade, re-download the Additional Tools for your new Xcode version. An outdated NLC preference pane will appear to work but silently pass traffic unthrottled.
2. Test against a non-localhost endpoint
NLC does not throttle traffic to localhost or 127.0.0.1. If your backend runs on the same Mac, the simulator will still see full speed.
Workarounds:
– Deploy the API to a staging server.
– Use a colleague’s machine on the same LAN.
– Expose your local server through a tunnel such as ngrok (ngrok http 3000) and point the simulator at the https://*.ngrok-free.app URL.
3. Alternative: SpeedLimit (menu-bar only)
If you prefer a menu-bar toggle and don’t mind an unmaintained tool:
- Clone or download https://github.com/mschrag/speedlimit.
- Build the project in Xcode and copy
SpeedLimit.appto/Applications. - Launch it, grant the requested permissions, and choose a preset from the menu bar.
SpeedLimit uses the same pf/dummynet subsystem as NLC, so it shares the localhost limitation.
How to prevent it
- Always verify throttling is active: open Safari in the simulator and load a large image; it should load visibly slower.
- Create a custom NLC profile that matches your target market (e.g., 1.5 Mbps down / 750 Kbps up / 150 ms RTT / 1 % loss for typical 3G).
- Add a CI step that runs UI tests with NLC enabled via
networkQualityCLI (macOS 12+) to catch regressions. - Document the ngrok/staging requirement in your onboarding so new team members don’t waste time debugging “fast” local calls.
FAQ
Does Network Link Conditioner affect other apps on my Mac?
Yes. NLC shapes all outbound/inbound traffic on the Mac, not just the simulator. Remember to turn it off when you’re done testing.
Can I throttle only the simulator process?
Not with NLC or SpeedLimit — they operate at the kernel level. For per-process shaping you’d need a proxy (e.g., Charles, Proxyman) configured as the simulator’s HTTP proxy.
Why does my local API still respond instantly?
NLC explicitly excludes loopback (lo0) interfaces. Use ngrok, a LAN IP, or a remote staging host so the traffic leaves the Mac and re-enters, triggering the shaper.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
