34

I just updated to Xcode 7 and ran an app on a live device. Now for some reason, I get an error when I try to run an app in a simulator.

Stop “(null)”? 
An instance of “(null)” is already running. Choose “Stop” to terminate and launch a new instance.

Image of the error pop-up in Xcode

When I press the stop button it grays out, as in the screen shot, but nothing happens. I have tried resetting the content and settings on the simulator, but that didn't help.

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92

7 Answers7

56

Getting this as well with Xcode 7.

I've been following these simple steps to avoid seeing the error:

  1. Build your app.
  2. Run your app.

Annoying, and not a solution, but I think this is a bug within Xcode 7.

joels
  • 1,292
  • 15
  • 21
  • I'm kind of confused, when I press the play button the app should builds and runs, but instead I get the error. So I can't build and run the app, because the error pops up. – Caleb Kleveter Sep 23 '15 at 16:43
  • 1
    Hm. Try killing the simulator, build, run? I'm confused as well but my work around is good enough for now. Or, may I suggest, using a physical device? I have a feeling you won't receive an error when using one. – joels Sep 23 '15 at 16:59
  • I didn't have the error with a real device, sadly I don't have an iPhone, I only have access to an iPad4. – Caleb Kleveter Sep 23 '15 at 17:04
  • I don't know what caused the error, but I can use the simulator now. – Caleb Kleveter Sep 25 '15 at 13:27
  • 1
    Oddly enough, I didn't do anything to my project or xCode settings and I am no longer seeing the error message either.. – joels Sep 25 '15 at 17:29
  • This is better than reloading! – kelin Dec 02 '15 at 09:12
  • I clicked "Build for Testing," and 2 seconds later I pressed play and everything worked. Good enough answer for now. – Buttle Butkus Jan 31 '16 at 02:16
  • This happens with real device too. – Sandeep Singh May 13 '16 at 12:54
  • Hi @Sandeep Singh, I've been trying to keep an eye out on repro steps for this issue. I've only noticed it happening when using the simulator. Can you share any details of how you saw it when pushing to a device? Did you make any changes to your project settings? – joels May 13 '16 at 15:53
  • @Joels the exact combination was Xcode version 7.2.1 and iPad mini with iOS version 9.2 . I was testing keychain thing in my device and at that time i saw this happened.In past this happens in Simulator only during my work but with real device i saw this yesterday. Will update more if saw this issue again in future. – Sandeep Singh May 15 '16 at 12:55
8

Completely quitting Xcode 7 and reloading resolved the simulator is already running it for me.

Manesh
  • 528
  • 6
  • 20
4

I got this error too, and building and then running the app (cmd+b ; cmd+r) solved the problem.

Vladimir Despotovic
  • 3,200
  • 2
  • 30
  • 58
2

TL;DR: This is a recurring error in XCode 7 with no known solution. To get rid of it, disconnect your device, then reconnect and carry about your day. If running the simulator, kill it, then restart it. Hopefully Apple addresses this soon.

JaredH
  • 2,338
  • 1
  • 30
  • 40
1

When you get like this stop (CMD+.)the stop the project.

->Quit Xcode

->Clean the project (CMD+Shift+K)

->Build the project(CMD+B)

->Run the project(CMD+R)

Uma Madhavi
  • 4,851
  • 5
  • 38
  • 73
0

If you are running on an actual device, I found that by disconnecting the device (iphone) from the computer/laptop and reconnecting eliminates this error/issue.

However, I still see in xcode the following message:

running <app name> on <phone name>

But at least I do not need to quit xcode.

I did not have this when running on a simulator (always testing on a real device...)

zevij
  • 2,416
  • 1
  • 23
  • 32
0

I suggest building your app and then cleaning it. For me, this ensured that later on I could just run the application.