开发者

iPhone Simulator running old version of code with iOS 4

开发者 https://www.devze.com 2023-01-12 05:13 出处:网络
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

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 kno开发者_Python百科w 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.


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).


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.


how about using UIApplicationExitsOnSuspend in your plist?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消