There are a number of iOS simulator settings that are either completely undocumented or only mentioned in passing in release notes, so I’ll try to put them here as I come across them in order to make easier to find. Shoutout to Twitter for surfacing them!

Disabling automatic pasteboard sync

h/t to @ObjCandTwits

Automatically syncing the pasteboard between macOS and the simulator is a welcome feature. Unfortunately, at least in my experience, it’s not very realiable and will randomly stop working. Worse, for some people it will cause stalls when running a lot of UI tests. Here’s how you disable it globally:

defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false

This is the user default corresponding to the option in Simulator.app’s Edit menu, but with the command line snippet, you can set it in your CI pipeline as well.

Extend app/test launch timeout

Under certain circumstances, starting UI tests can take long enough for the simulator’s watchdog process to kick in a kill the process. In that case, you will see a crash or error with “Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d”. You can increase the timeout for each simulator instance like this:

xcrun simctl spawn <device UUID> defaults write com.apple.springboard FBLaunchWatchdogScale 2

Show touches in simulator

This one is more well known, but figured I’d include it here because of how useful it is. If you ever want to show off something in the simulator over video call, you can use this setting to provide a visual indicator for when you’re clicking or dragging.

defaults write com.apple.iphonesimulator ShowSingleTouches -bool true