iOS Simulator using too much memory
Each booted simulator is a full copy of iOS. On Xcode 26, an idle iPhone 17 simulator runs close to 100 processes and holds about 1.5 GB before you open an app. Two or three of them, and a 16 GB Mac starts to swap.
See which simulators are running
xcrun simctl list devices booted
== Devices ==
-- iOS 26.5 --
iPhone 17 Pro (4F1A2C3E-…) (Booted)
iPhone 17 (9B07D1AA-…) (Booted)Expect more here than you have windows. Closing a Simulator window doesn't always shut the device down, and Xcode boots devices with no window at all for tests and builds. Activity Monitor won't help much: a simulator shows up as dozens of small processes, not one big one.
SwiftUI Previews run in a separate set of devices that the command above doesn't list:
xcrun simctl --set previews list devices booted
Shut them down
# every booted simulator xcrun simctl shutdown all # just one, by the ID from the list xcrun simctl shutdown 4F1A2C3E-… # the Previews devices; Xcode boots them again when you open a canvas xcrun simctl --set previews shutdown all
Shutting down keeps each simulator's apps and data. It only frees the memory. In our test, shutdown all took the simulator processes from 1.5 GB to under 30 MB.
Keep it down
- Run one simulator at a time. Each extra device is another full iOS.
- Close the preview canvas when you're not using it (Editor › Canvas, ⌥⌘↩). An open canvas keeps a Previews device booted.
- Watch memory pressure, not free memory. The graph at the bottom of Activity Monitor's Memory tab turns yellow when macOS is busy compressing memory, and red when it runs short and swaps.