5

I just downloaded Xcode 6.4 from App Store and started to create a hello world app to learn swift but I get the error saying "Invalid Device State".

Screenshot 1

I googled a lot and tried the below things:

  1. Restarted Mac and entered xcode and started project (as mentioned in a stack overflow thread)
  2. I created a new iOS app with another layout but showed the same error again if I ran that project.
  3. I deleted all projects and re-installed Xcode again. Started a new project and ran it but still getting the same error.

I am running Yosemite 10.10.1 and the Xcode version is 6.4.

Can anyone help me ?

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
codekidX
  • 98
  • 3
  • 8
  • Possible duplicate of [Invalid Device State - Xcode/iOS Simulator error](http://stackoverflow.com/questions/29480245/invalid-device-state-xcode-ios-simulator-error) – Cœur Jan 28 '16 at 02:16
  • See my answer at http://stackoverflow.com/questions/29480245/invalid-device-state-xcode-ios-simulator-error/36352622#36352622 – Chirag Vindhani Apr 01 '16 at 09:49

2 Answers2

4

Devices can get stuck in the creating state if errors occur in older versions of Xcode. This was fixed at some point in Xcode 7, but I'm not sure if the fix made it back into an Xcode 6.x release.

From Terminal.app, please run 'xcrun simctl list'. Locate the UDID of the device that you are attempting to boot. If it is stuck in the 'Creating' state, you can try recreating it by running 'xcrun simctl erase '.

If it is stuck in a different state, please update your question appropriately to indicate which state the device is stuck in.

On a side note, I suggest you update your OS. There have been a lot of quality fixes since 10.10.1. 10.10.5 just came out.

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
1

Try to switch from your original simulator to new one (for example from iphone 6 to 6plus) and then switch back to original one (iphone 6) and it should be ok

rgreso
  • 496
  • 1
  • 7
  • 19