Change the Location of Screen Shots Saved by the iOS Simulator
Asked Answered
L

8

40

I'd like to change the location that screenshots created via File > Save Screen Shot in the iOS Simulator are saved from the desktop to a folder of my choice. How can this be done? Perhaps there's a user defaults value I could change, much like the one specifying the location of standard screenshots on OS X?

Leis answered 14/5, 2014 at 17:16 Comment(1)
See my answer using an Automator workflow (as folder action) insteadThumbscrew
G
65

In Xcode 12 we now always set the default location to wherever you last saved a screenshot, so to change the default location press ⌥ + ⌘ + S then select the location.

Also new to Xcode 12 you can right-click on the screenshot preview window that appears and you should see Desktop, Documents, and your custom location (if you've set one that isn't the Desktop). So even if the default is somewhere else you can always send the screenshot to the Desktop. You can also drag this window and drop it in an app or the Finder.


In Xcode 9 you can hold down Option while saving a screenshot and we will prompt you for the location. Check the "Use this as the default location" box to make the selected directory the default for all screenshots.

Screenshot Save Panel

Gwenngwenneth answered 14/9, 2017 at 19:39 Comment(3)
This is a perfect answer, now that it is possible to do this via XCode UIOvercoat
This is amazing! Thanks for sharing.Immotile
Note: it seems this behavior changed slightly somewhere along the way. With Xcode 11.5 I'm not seeing a "Use this as the default location" option. (Now there is an "Apply device mask to screenshot" option in its place.) However, whatever directory I choose in that dropdown still seems to become the default.Leis
N
24

Simulator saves screen shot file on (logged-in user's) desktop and it's default path.

To change default path (with Xcode 9+), press and hold ⌥ Option (alt) button from keyboard, while you take a screen shot.
Or
Using Mac Keyboad: Press keys ⌥ Option + + s all together.
It will show a dialog with file storage options and also allows to set/change default path.

enter image description here

Northnortheast answered 23/5, 2018 at 16:58 Comment(0)
I
11

Just use MacOS defaults =)

#Read current value:

defaults read com.apple.iphonesimulator ScreenShotSaveLocation

#Set path to ~/Pictures/_screenshots:

defaults write com.apple.iphonesimulator ScreenShotSaveLocation -string ~/Pictures/_screenshots

https://macos-defaults.com/simulator/screenshotsavelocation.html#set-to-pictures-screenshots-default-value

Iconium answered 25/3, 2021 at 12:36 Comment(0)
M
4

I use Automator. It's easy and free. move screenshots

Manuel answered 6/5, 2016 at 0:17 Comment(1)
This worked great. I had never used a Folder Action before. So for those who don't know--you just save this configuration in Automator. It runs in the background. The next time that Desktop receives a screenshot it will be moved to your other folder after a few seconds.Bolanger
T
1

You will not be able to do that.

An easy alternative could be (after changing the default screenshot directory):

  1. press cmd+shft+4
  2. press spacebar
  3. Click your iPad/iPhone simulator window
Tapes answered 24/10, 2014 at 11:18 Comment(3)
Well yes. I was hoping to find a way to change the save location of the actual simulator screenshots taken at the appropriate resolution and excluding the surrounding window, but given that this is as close as it seems possible to get at the moment, I'll mark it as the answer until and unless something changes or something better comes along.Leis
Solved by XCode 9, see answer by russbishopOvercoat
Searching internet for something, I found these 1,2,3 steps are so elegant.Spud
T
1

You can use Automator to create a Folder Action workflow to automatically move screen shots from Desktop to your desired folder.

Steps: Filter items containing iOS Simulator Screen Shot in name. Then move those items to your chosen folder.

Here's a sample https://github.com/chrisamanse/iOS-Simulator-Screenshot-Mover

Thumbscrew answered 4/6, 2015 at 19:59 Comment(0)
D
1

It can easily be done using the new command line interface (since Xcode 8.2)

xcrun simctl io booted screenshot ~/Desktop/screenshot.png

Replace ~/Desktop/screenshot.png with your folder location and it will be saved on there.

Further information in this blog: https://medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0

Deary answered 14/8, 2017 at 10:1 Comment(1)
Does not seem to work anymoreFederal
S
1

Just Press Option + command + s together and it will prompt you a dialog where you want to save screenshot.

Squilgee answered 10/7, 2019 at 4:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.