31

In the old version of the Xcode Simulator (Xcode 8), you could press Command + 1, and it would show the simulator to be it's maximum dimensions (100%), even if that involved it expanding past the visible screen space. You could then press Command+S and take a screenshot from any simulator, and use that directly for the app store. (It would be the correct resolution). I did this for iPad Pro 12.9" and iPhone 6s Plus, to quickly fill out my screenshot sections.

Now, in Xcode 9, this no longer works. I have tried all options: manually resizing, setting to 100%, zoom on/off, etc. None of the options allow me to expand the simulator past the visible bounds of my screen. It won't let you drag the corner past the bounds. So when you press COMMAND+S to take the screenshot, it winds up to be lower res than what ItunesConnect needs.

So how can we now take screenshots using the simulator only, and have them be usable for the store with the correct resolution?

FranticRock
  • 3,024
  • 26
  • 50

4 Answers4

72

In Xcode 9.1, go to Simulator Menu > Debug > Optimize Rendering for Window Scale. disable this option, now the screenshots will be in the right size (resolution).

yass
  • 1,066
  • 8
  • 12
  • 2
    OK, this is the correct answer. With that option on, it saves the screenshot according to the window size you resized to. With that option OFF, you get the full size screenshot (For an iPhone 7 Plus for example, it's: 1242 x 2208 PX) – FranticRock Nov 30 '17 at 14:31
  • 4
    Omg Apple. Why must you make everything so difficult and obscure. – GONeale Jun 21 '18 at 03:56
4

That's a bug in Xcode 9 (and, I would say, in Xcode 8 as well; the idea that the resolution and size of a screen shot would depend on how you displayed the simulator window was always just plain wrong).

Update to Xcode 9.1. In Xcode 9.1, Command-S always gets the resolution (and size) right for the device represented by the simulator window.

For example, if I say Command-S on the iPad Pro 9.7-inch simulator window in Xcode 9.1, no matter how big the window is, I get a screen shot that is 1536×2048. Well, that's the correct size for a screen shot to be submitted to the App Store. Nothing else needs to be done.

Cœur
  • 32,421
  • 21
  • 173
  • 232
matt
  • 447,615
  • 74
  • 748
  • 977
  • And the whole Sizes kerfuffle in the Window menu is mercifully gone. – matt Oct 02 '17 at 17:57
  • Found a hybrid solution. Installed 9.1 with 9.1 simulators. I was able to find a single way to then manually expand the simulator past the screen bounds. 1. Device Bezels have to be ON. 2. You grab one of the TOP corners, and drag it up to the top of the screen repeatedly. Then you repeat this over and over, until you are fully zoomed in. Normal corner click and drag (diagonal) doesn't work. With device bezels OFF, dragging past the screen bounds doesn't work. 2 hours later, I am now unblocked. I'm using a Samsung 27" screen on a MBP 15". – FranticRock Oct 03 '17 at 14:44
  • I would think that hooking up to a massive TV as a screen would work too, but haven't tried it. – FranticRock Oct 03 '17 at 14:45
  • If my answer didn't work for you, I don't understand why you accepted it. – matt Oct 03 '17 at 16:03
  • You are right. I thought the ability to resize using the drag-up method was attributed to Xcode 9.1, but it is NOT. I am able to resize using this approach on Xcode 9.0 simulators as well. Therefore i will add this as a hack answer for now, until someone provides a more user friendly solution. – FranticRock Oct 03 '17 at 19:58
  • You see, what my answer tries to say is that you don't NEED to resize anything; you just hit Command-S and the screen shot is correct: it has the required dimensions for the screen shot to be submitted to the app store. So I see your answer as working around something that doesn't need to be worked around in Xcode 9.1. You don't see the same thing? – matt Oct 03 '17 at 20:14
  • I understood your answer perfectly the first time. I guess the fact that it didn't work wasn't obvious from my response... I was able to start the Xcode 9.1 sim earlier, but my experience was exactly the same as when using the 9.0 sim. The screenshot generated always had the dimensions corresponding to the selected simulator size. Now the 9.1 sim completely stopped working (won't start with exception: 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: CGRectContainsRect). This error happens before my app is even started. Every iOS version. – FranticRock Oct 04 '17 at 01:47
  • Well, I can't account for that. But I assure you that this works perfectly on my machine. Did you remember, in Xcode 9, to delete all simulators and recreate any needed simulators from scratch? In any case, that's a completely different issue. – matt Oct 04 '17 at 01:49
1

Here is a temporary workaround that allows expanding your device simulator window to the desired maximum size in both Xcode 9.0 and Xcode 9.1.

  1. Run the simulator.
  2. Go to Window --> Show Device Bezels. (should be enabled).
  3. Grab one of the top bezels (left or right), and drag straight up repeatedly, until the simulator window gets to your desired maximum supported resolution for the screenshot you are trying to take. For the iPad Pro 12.9" resolution I needed, this is: 2048 x 2732, and I am now able to produce these 6MB screenshots.

NOTE: That after a certain point, no matter what size you expand to, you will not get a higher resolution than that device supports. This is to be expected. You just get a zoomed in version of the simulator (which is also useful)

FranticRock
  • 3,024
  • 26
  • 50
  • In Xcode 9.1, you don't need to grab _any_ bezels or do _any_ dragging. That is what my answer tries to explain to you. It doesn't matter whether the bezels are showing, and it doesn't matter what size the window is. It _just works_. – matt Oct 03 '17 at 21:26
  • 1
    The simulator screenshot size seems to be buggy at best, even in 9.1. I've had some success with restarting the simulator, moving the window to different monitors, and hitting physical size and then resizing the window. Hope this helps. – jyoung Nov 05 '17 at 18:33
1

I just want to add one thing with Xcode 9. You need to use Command + S instead of Command + Shift + 4, spacebar then left click to get the right sized screenshot after you disable "Menu > Debug > Optimize Rendering for Window Scale". Screenshots will be saved on the desktop.

shim
  • 7,170
  • 10
  • 62
  • 95
Bo Yuan
  • 39
  • 1
  • 4
  • For XCode 10, make sure that Windows -> Show Device Bezels is unchecked. Then go to File -> New Screenshot and you will get a screenshot with the correct dimension requested by iTunes Connect. – Bo Yuan Jun 11 '19 at 14:49