iOS Dev Tip: Save iOS Simulator Screenshots in your normal Screenshots folder

If you are anything like me, you don’t like screenshots cluttering your desktop. Unfortunately, the desktop is the default place to store screenshots in macOS, so this has to be changed.

Our plan here is to create a screenshots folder on our Mac, then have macOS save screenshots there. Next up, we want to have Simulator save the iOS Device screenshots there as well. That way, we only need to look in one single place to find any of the screenshots taken in our daily workflow.

# make the screenshots folder
mkdir ~/Desktop/Screenshots

# make macOS save screenshots taken on mac to this new screenshots folder instead of the desktop
defaults write com.apple.screencapture location ~/Desktop/Screenshots

# make macOS save screenshots taken in Simulator app during iOS dev work to this same screenshots folder
defaults write com.apple.iphonesimulator ScreenShotSaveLocation ~/Desktop/Screenshots

# restart a few systems to make these changes take effect
killall SystemUIServer

killall "Simulator" 2>/dev/null || true


Now, simple take a few screenshots on your mac and in the simulator and notice how clean your desktop looks!

Happy coding!