Simulator shows black screen on second time run - ios

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

Related

Simulator has black screen and does not load

Normally, when I start the iPhone simulator, the chosen simluator appears, I get a black screen and a loading indicator in the screen of the phone.
Today, I started the simulator (not prom a Xcode project or something else, but from the App Simulator, searched with Spotlight) and the only thing there is: a black screen. No loading indicator, nothing. There is nothing happening. The phone just stays black... I did not update Xcode, the simulator, nor am I starting the Simulator from a project, but from the "bare" Simulator App.
What I tried so far to solve the issue:
I tried changing the simulator to another device, with the same result. I tried Erase Content and Settings but that did not even open the usual menue I see.
Open the Activity Monitor, search for sim and kill all processes
Open the terminal, sudo xcrun simctl erase all but that goes on and on and on forever and yields no results. Not sure what is happening there.
Restart the computer.
Try another phone on the simulator.
Not sure why this helped, but I opened a random Xcode project and did a deep cache clean through cmd+alt+shif+k and now it works...

iOS Simulator Always Takes The Same Screenshot

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

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.

Iphone starts lagging and not responding while debugging via Xcode

I've been trying to test my app on IPhone but the phone freezes time to time and stop responding for a while and so .. when its connected to Mac
(Mac is Installed on VMWare and there has been nothing wrong with it till now even the emulator)
any Idea on what may cause the problem ?
I suggest restarting the simulator and Xcode
first quit Xcode then make sure the active window is the simulator next what you want to do is look up at the task bar (gray bar at the top of the screen) click on hardware and then scroll down to reboot and click that, the simulator will now restart when the simulator finishes restarting navigate over to simulator and click on "reset all content and settings"
if that does not fix the problem try using another simulated device in my experience some work better then others (try the iPhone SE or the iPhone 5s they have worked better for me)

iOS Simulator displaying white screen (only in simulator, screen shot shows UI)

After researching previous topics on this issue, I can't seem to find an answer for my problem.
Xcode Version Version 6.1.1 (6A2008a), OS X Yosemite Version 10.10.2 (14C109)
I just finished creating my first simple application in Xcode using the Single View App template, but cannot get the iOS simulator to get past a blank white screen, no matter how long I wait.
Here's a screen shot of my main.storyboard UI/Assistant editor:
It will however sometimes display the copyright information.
Here's what I've tried already:
Made sure my Main Interface was set to Main (main.storyboard)
Waited for an hour+ for iOS simulator to load and it never did
Tried Reset Content and Settings in the iOS simulator and then tried simulator again
Tried different devices besides iPhone 6 as target devices to simulate and I was able to get the iPhone 5s simulator to display the button, but only the button.
Uninstalled Xcode by moving to the bin, emptied trash, reinstalled from App Store
Now it gets even more strange, If I run the simulator using iPhone 6 as my target device and take a screen shot of my simulation, every object appears normally in the screen shot but NOT in the simulator (still just a blank white screen). Here's that screen shot:
Any help will be greatly appreciated.

Resources