Andrew Ebling
Andrew Ebling

Reputation: 10283

iPhone Simulator running old version of code with iOS 4

I'm having problems with the iPhone Simulator running an out of date version of my app binary with iOS 4, since it seems Xcode is not killing the process completely, hence the debugger is picking up the app process from the previous build/debug cycle, even if I click the "Kill" button on the toolbar.

Does anyone know a way of forcing the simulator to stop and reload the newly compiled version of a binary, other than i) quitting the simulator ii) completely resetting the simulator? Both of these work arounds are inconvenient and slow down code/build/debug cycles.

Upvotes: 2

Views: 787

Answers (4)

elm0
elm0

Reputation: 11

how about using UIApplicationExitsOnSuspend in your plist?

Upvotes: 1

Franz Bettag
Franz Bettag

Reputation: 437

If you're nagged by this issue during development, the following is a workaround:

- (void)applicationDidEnterBackground:(UIApplication *)application {
#if (TARGET_IPHONE_SIMULATOR)
  abort();
#endif
}

Since when you recompile, it will put the app into the background, this will abort the execution. Of course this blocks any multi-tasking-usage in the simulator and should not be used in final builds (since apple doesn't like abort() calls).

Upvotes: 2

Kent Miller
Kent Miller

Reputation: 26

I filed a bug about this (rdar://8247461) and it was marked as a duplicate of rdar://8060328 - this is driving me crazy - I hope it gets fixed soon.

Upvotes: 1

Scott Pfeil
Scott Pfeil

Reputation: 414

I'm not sure why you are experiencing the problem, but if you want to delete an app from the simulator click and hold on the app to get the delete to come up. If you can terminate an app in the back ground by double clicking the home button and then clicking and holding on an app. Sorry if none of that is what you're looking for.

Upvotes: 0

Related Questions