Xcode 12.0.1 Screenshot is capturing only Home-screen on iOS simulator
Asked Answered
B

3

11

While trying to capture a screenshot on Xcode V12.0.1 - the app screen turns to "Home screen" (of IOS) and a screenshot on the home screen is prodcued instead of the app screen.

It was working fine a week before, but my OS and Xcode were auto updated last week to MacOS 10.15.7 and Xcode V12.0.1 and since then i am unable to take screenshots of the simulator.

enter image description here

Baste answered 12/10, 2020 at 11:48 Comment(0)
I
15

I ran into this issue and as of now I can only provide a work arround - Use command line to take the screenshot

  • cd to the folder that you want save the screenshots to.
  • Run xcrun simctl io booted screenshot Screenshot.png
Inkster answered 27/10, 2020 at 9:53 Comment(3)
it doesn't work, it displays main page with current page mixTherapeutic
I just tried it and it still works. I am using Xcode 12.5Inkster
Doesn't work for me either (Flutter app, XCode 12.4).Wipe
B
6

Firstly, this problem still happens (at least, for me) in Feb 2021 with Xcode 12.3.

Secondly, I was running Xcode and the simulator on an older (slow) Mac mini, so doing something like xcrun simctl io booted screenshot Screenshot.png worked for me too, but it took over 30 seconds from pressing "enter" to when the snapshot was captured, so by then the simulator screen had changed (I was trying to get a screenshot of the launch image). I suppose with careful timing, to use the command 30 seconds or so before the time the simulator is displaying the desired screen, is one way, but tricky and error prone.

Thirdly, I tried restarting Xcode, after quitting the simulator as well, and it worked for me. It seems to have a good chance of working when Xcode is first started, although later the "home screen" bug appears to surface for some unknown reason.

Baskerville answered 7/2, 2021 at 5:57 Comment(1)
I found that once you take a screenshot, it will only re-use that screenshot until you quit the simulator and start from scratch. So you only get one screenshot per run of the simulator. Still happening as of XCODE 12.4 .Silici
W
2

If you copy the screen it seems to work as well.

Simulator -> Edit -> Copy Screen

Then paste the image from clipboard into an image editor etc.

Wheeler answered 22/3, 2021 at 19:36 Comment(1)
This worked for me when the accepted answer didn't. It doesn't capture the chrome but that's probably fine in many cases.Wipe

© 2022 - 2024 — McMap. All rights reserved.