2

I have a problem with my iPhone simulator. Since yesterday when I press Build and run.

  • Xcode builds the project
  • Simulator closes the running app
  • Simulator opens the running app in same state as it closed (multitasking?)

The old build keeps running, I have to quit the simulator before i can run the new build. I tried cleaning the project, tested with a new project. Same problem. Rebooted everything.

Running Xcode 3.2.4 / 4.1 SDK.

Saa
  • 1,540
  • 10
  • 22
  • What happens if you delete the old app from the simulator, either from within the simulator or from ~/Library/Application Data/iPhone Simulator/{version}/{app ID}? – outis Oct 26 '10 at 10:22
  • no reason why this should be happening. And it shouldn't be doing multi-tasking either because when you build and run it re-installs the program on your device (this instance in the simulator). Does it do this even if you press the stop tasks button? – Thomas Clayson Oct 26 '10 at 10:23
  • Doesn't do it when I remove the app within simulator. But then starts doing it again. And it does it even when I stop first. (works when I stop using doubletap on home btn) – Saa Oct 26 '10 at 10:32
  • Tried a new Xcode install. No luck :( – Saa Oct 26 '10 at 14:08

2 Answers2

2

I was going crazy with the same problem. It seems that some people have this problem and some don't. Somehow I stumbled onto this: http://openradar.appspot.com/8915498

Basically, it says that if you're running the iPhone simulator on a different volume than the xCode app, there is some problem with updating the simulator and you have to restart each time.

I almost ignored the fix because I only use one volume, but I DO use filevault for my home folder. Since the Library/Application Support/iPhone Simulator was in my /Users/[me] directory, I guess it's a different volume.

So, what I did was:

1) Go to /Users/[Me]/Library/Application Support/iPhone Simulator and renamed to "old-iPhone Simulator" (just to get it out of the way without deleting)

2) Go to /Library/Application Support and create a new folder called "iPhone Developer"

3) Open Terminal and enter: ln -s "/Library/Application Support/iPhone Simulator" "/Users/[Me]/Library/Application Support/iPhone Simulator"

Viola! Worked like a charm for me! Now iPhone simulator shows me the changes I make every time I push "Build and Run" without any other hassles! Yay! 3)

truthsmiles
  • 136
  • 6
1

I added a Run Script to my target to work arround the issue

killall -9 "iPhone Simulator"

Not a proper fix, but works for now.

Saa
  • 1,540
  • 10
  • 22