Invalid Device State - Xcode/iOS Simulator error

假如想象 提交于 2019-11-27 14:15:41

Force Quit xCode and restart will resolve problem.

I had come across this issue after updating Xcode 6.4 to 7.1. Below are fixes for this :

  1. Clean project (cmd+shift+k) as well as clean build folder (cmd+shift+k+option)

  1. Quit simulator and run again
  2. Quit Xcode and Simulator and run again
  3. Restart your Mac.

Solution 3 worked for me!

I had the same issue. Generally it is because you just update Xcode or change its name in the Applications folder.

If you just restart your computer it will work correctly.

Hope it helps !

I observed this happening when more than one Xcode app installed.

To fix this,

  1. Launch Xcode and click preference..,
  2. Go to "Location" Tab, Select correct options from "Command Line Tools" dropdown
  3. Quit Xcode and relaunch it.
  4. Run your app.

First of all, just clean the project.

  1. Quit your project.
  2. Quit your Xcode.
  3. Restart Xcode.

This happens to me when I have two different Xcode versions running at the same time. Hopefully this helps you.

No need to quit, restart or even re-install. Switch to another iOS Simulator device (6s if you were using 6s plus) and voila!

Nothing worked for me on XCode 7.3.1.

Had to reinstall it to make the simulator work.

  1. Go to applications folder. Drag drop XCode to Dustbin.
  2. Empty dustbin contents.
  3. Go to App Store and install XCode.
  4. Run XCode. The simulator should work now.

I have Xcode 7.3 and Xcode 8.0 Installed.

If a am working with Xcode7.3 and opens Xcode8.0 to get some code from Xcode8.0 project.

When i run my application on Xcode7.3 So it will give me same error.

Solution is simple ForceQuit or Quit all Xcode's and open the required one.

In my case, the simulator would show an indefinite black screen whether attempting to run a project, or running the simulator directly (which should bring you to the simulated home screen). This would happen even on a newly created simulated device.

After the existing suggestions failed, the following worked for me:

  • Delete the Simulator
  • Delete XCode
  • Delete the Developer folder
  • Reinstall XCode from the app store. This requires attempting to run XCode again so that Mac OS will realize it's no longer installed.

Jus clean the project and restart Xcode. This happens to me when I have two diffent xcode versions running at the same time.

Robust fix is Just Quit your xcode and run again, hope so it will help you. This heck work for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!