21

When trying to take a screenshot on the iOS simulator, it works the first and only time. After this, subsequent screenshots are always an exact copy of the first, regardless of what is actually on the screen.

This will reset once the device is restarted but this is not a very good solution, as it requires you to restart the emulator every time you want to take a screenshot.

I have tried wiping all data and resetting the emulator. This did not work and the problem persists.

The emulator is an iPhone 12 Pro Max running iOS 14.3.

Does anyone know any ways to fix this problem?

tubbytoad42
  • 283
  • 1
  • 6
  • I'm not seeing that behavior - each screen shot (using `File -> Save Screen (⌘S)`) results in what I currently see in the simulator. Are you using some other method to generate your screen shot? – DonMag Dec 18 '20 at 20:18
  • 1
    No, I am using the in-built screenshot function. This is the button above the emulator at the top or also File -> Save Screen as you mentioned. It's a very strange problem caused by no obvious reason. – tubbytoad42 Dec 18 '20 at 20:23
  • I really can't see how that can happen. I know this sounds silly, but are you sure you are looking at the right file created when you press the save screenshot button? – Larry Dec 19 '20 at 05:41
  • 3
    I can't see how this can happen either - it is such a glaring bug. Whenever I take the screenshot, it makes the little animation down to the bottom right corner of the simulator, where the thumbnail of the screenshot just taken is shown. As mentioned in the problem it is always the first screen which gets captured. The screenshot doesn't even have to be saved to observe the problem, since the last screenshot is shown as a thumbnail. Saving the screen to a folder will still give the first screen. Unless I am missing something huge in the operation of the simulator? – tubbytoad42 Dec 20 '20 at 20:11
  • 1
    Also the first screen appears in the simulator for a brief time right at the moment the screen is taken. – McX Dec 21 '20 at 21:03
  • 2
    This is a very frustrating bug. Apple development tool is always very buggy. – TPG Jan 09 '21 at 08:11
  • Did you solve this problem @tubbytoad42 – CHRIS LEE Feb 16 '21 at 22:08
  • as a workaround capture a screen recording – Ahm3d Said May 15 '21 at 04:49
  • @tubbytoad42 you're not missing anything. This bug is old and it's still here. – Gábor Jan 01 '22 at 16:18
  • 1
    @Larry - exactly as he describes. Not only we get the same screenshot as the very first one, the anination of the screenshot jumping down to the bottom of the screen shows the same first image every time. You need to restart your app ten times in order to get ten different screenshots. Very frustrating and very odd that it hasn't been fixed for such a long time. – Gábor Jan 01 '22 at 16:23
  • This is really strange bug. Is there any solution for taking several different screenshots without restarting the device? – cocoa Jun 02 '22 at 01:53

5 Answers5

13

There is a workaround using the terminal:

xcrun simctl io booted screenshot MyScreenshot.png

This will save the screenshot in the current directory.

Panagiotis Koursaris
  • 3,794
  • 4
  • 23
  • 46
3

Not exactly a solution, but you can do it inside the iPhone

Device -> Trigger Screenshot

and then Where are iOS simulator screenshots stored?

giorgio79
  • 3,787
  • 9
  • 53
  • 85
3

Same issue running Xcode-12.5.1 and iOS-14.5. Solution:

  • Simulator > Device > Trigger Screenshot
  • XCode > Window > Devices and Simulators > get your simulator's id
  • Screenshots saved at: ~/Library/Developer/CoreSimulator/Devices/20CAAAC7-3E70-43B1-B636-A1810A678829/data/Media/DCIM/100APPLE/
Vu Trinh
  • 89
  • 5
1

I've a similar issue, the only difference is that I can take a different screenshot after I erase all data.

Forethinker
  • 3,548
  • 4
  • 27
  • 48
Hassan Ansari
  • 318
  • 1
  • 3
  • 11
1

Workaround using Edit > Copy Screen

JoaquinBu
  • 321
  • 2
  • 5