Simulator does no start or device is locked

It is very frustating.... it happens very often.... you start coding... launch the simulator.... at first, everything works rigth, but after several runs the simulator does not star at all.... or, if you are using an iphone, xcode says "device is locked" but it is not.


You must restart Xcode.


Any solution to this?


Best!!!

Accepted Reply

Just a follow up


After several weeks suffering with the simulator, last week it was very hard to use it, sometimes it does not star al all, even with a fresh reboot.


I still thought it shouldn't be a memory problem, 8 GB should be enough to develop, anyway, I am not developing and App with hundred of MG of data. So I decided to format the hard drive and start with a clean (Catalina) install.


After this, Xcode works great, the machine is faster and zero problems with the simulator. Something was definitely clogging the Macbook, with this new installation from scratch the problem was solved.


Hope this helps others with the same problem.

Replies

Does XCode crash ? If so, send the report directly.

Which XCode version ?

iOS app ?

Which iOS version on device ?


the simulator does not star at all

Is the simulator already on screen ?

Have you checked you have not memory leaks so huge that you in fact crash the simulator ? If so, you create your own frustration.


If you have tested this and problem still occurs, yes, there is a solution: file a bug report.

Which version Xcode on what macOS?


How much ram on your mac? How much free space on your SSD?

The simulator is already on screen.... first time run, no problem, it happens after several runs. I have searched for a solution to this problem and can not find a definitive solution.

Did you check for memory leaks ?

Look at Debug navigator (7th icon at top left panel): wdo you see memory used by app growing ?

You may also run Activity Monitor and see how much memory used and available.


8 GB is really limited memory now with XCode 11.


Does the same problem occur on device or only on simulator ?

Just a follow up


After several weeks suffering with the simulator, last week it was very hard to use it, sometimes it does not star al all, even with a fresh reboot.


I still thought it shouldn't be a memory problem, 8 GB should be enough to develop, anyway, I am not developing and App with hundred of MG of data. So I decided to format the hard drive and start with a clean (Catalina) install.


After this, Xcode works great, the machine is faster and zero problems with the simulator. Something was definitely clogging the Macbook, with this new installation from scratch the problem was solved.


Hope this helps others with the same problem.