iOS Simulator Always Takes The Same Screenshot - ios

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?

There is a workaround using the terminal:
xcrun simctl io booted screenshot MyScreenshot.png
This will save the screenshot in the current directory.

Not exactly a solution, but you can do it inside the iPhone
Device -> Trigger Screenshot
and then Where are iOS simulator screenshots stored?

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/

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

Workaround using Edit > Copy Screen

Related

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

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.
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
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.
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.

Keyboard gets stuck in ios 13 simulator

I have been trying to make my project work with the new Xcode 11. Everything works smoothly, except on several occasions when I run my app on the simulator (iPhone 11 Pro Max), the app freezes after I click on EditTexts. This happens after a few times I have used the app. If I clear the simulator memory and restart everything works normally.
I created a view controller with just the EditText and am able to replicate the simulator freezing. Sometimes it freezes before launching the soft keypad, sometimes after it has been displayed. I am still able to kill the app and rerun it through Xcode but it freezes every time unless I do hardware reset on simulator.
I am just concerned if this would happen on the device too? Has anyone faced this?
Edit: Just to add. When this happens, I try to use the messaging app and the same thing happens there.
Same problem on Xcode 11.0 and simulator with iOS 13/iPhone 11.
For me, the workaround of disable "automatically paste" don't work.
The only way is to restart simulator.
This thread is open on Apple Forum [https://forums.developer.apple.com/thread/122972]
The only fortunate solutions is to restart the simulator.
I had the same problem. Apparently it's a bug on the Simulator. Hopefully it will be solved soon, but until then, you can fix by unchecking the pasteboard option.
Simulator -> Edit -> Automatically Sync Pasteboard.
From this helpful answer here.
This is happening to me as well. This is a bug with the current release of Simulator.
When i click on textfield, app freeze and stop working. This problem still exists on Xcode 11.1 The solution is:
"Hardware -> Restart"
Then running normally. Try this.
Force quit the simulator and restart again works for me.
Same happens even in built-in apps on iOS 13 Simulator in the moment when you about to start typing :facepalm: Initially I thought that happened because I included new framework and had no clues what's going on but then found this :)
Please do not change your code it's not your code issue, its simulator bug.... So try to restart the simulator or stop the application and run again.
It will work fine on your device.
On Mac Catalina with Xcode 11.4 I tried this:
From simulator, toolbar choose I/O then Keyboard then Toggle Software Keyboard
Or
Simply hit Command + K while cursor placed in text Field.
Also have the same problem. When I restarted the simulator after it got stuck it haven't happened again. Seems like it is a simulator bug and not an app issue - https://forums.developer.apple.com/thread/122972
Its happening when pickerView appears as well, unfortunately have to restart simultor again.
If your are working on the iOS Simulator than simpley Restart your simulator & * Kill the Metro *
and run the react-native run-ios again.

xcode 9.0.1 simualtor error on building the project at random times

When I start simulator at random times when I compile/run project my simulator goes like in the attached image...if i press the menu button it doesn't change it remains the same. The error make it impossible to use the simulator.
I tried restarting, resetting simulator work but then it happens again.
What i do to solve the problem:
1. stop project
2. Hardware -> restart simulator
it happened to me 2 times in a row and this method worked and i didnt had to restart laptop.... but you have to do it fast ....
Try to run the default app.
If it doesn't work: there are only two solutions:
run it on an actual device
download the iOS 10.3 simulator (Xcode->Preferences->components->Ios 10.3 simulator)
remember to set this answer to correct if it helped. ;)

iOs Simulator running slow

Guys I really need your help. I was so concentrated running my game on iphone 5s device and I didn't realize that iphone 6 is running a little slower than the 5s and the 6 plus worst. What can I do for it?
This is a very common bug with the simulator a way I get around it is.
IOS Simulator: Window > Scale > 50% - it makes the simulator look like an actual device and it fits your screen perfectly.
Then I just leave the simulator open at all times rather then closing after I'm done testing my apps. This saves Xcode having to load all the simulators files and directories each time you run your app.
Hope this helps, cheers.
Did you try cleaning? Sometimes applications have problems.
iOS Simulator:
iOS Simulator Menu > Reset Content and Settings..
Xcode:
Product > Clean

Simulator shows black screen on second time run

I'm using Xcode 6.1, on first time launch iOS 8 simulator is always fine. But if I quit it, and tried to open it again, I'll get a black screen.
I've tried reset content and settings button, but it is not helping. If I reboot my laptop, it will be fine. But still if it shows black screen on second time.
Can anyone please give me some suggestion here? There must be something I could do to reset the simulator.
Sometimes it can take a while to boot the simulated device. You can check on the progress by looking at the simulated device's syslog:
tail -F ~/Library/Logs/CoreSimulator/<Device UDID>/system.log
You can determine the UDID by running xcrun simctl list
Select project-> go to general-> add launchscreen.xib in app icons and launch screen file

Resources