My iPhone Simulator gets SIGTERM when I quit it after clicking Home button

1.2k Views Asked by At

My iPhone Simulator always gets SIGTERM signal when I quit it after clicking Home button. No matter what app I run, even the template app generated by XCode, as long as I first click Home button then quit Simulator, I will get SIGTERM signal in main.m for this line of code:

int retVal = UIApplicationMain(argc, argv, nil, nil);

I believe this is a bug in XCode4 because it doesn't happen in XCode 3.2.6 and for every app I will get this error.

One way to fix it is that I have to return to my app then quit Simulator. But that is kinda annoying, anyone knows a better way to fix it ?

1

There are 1 best solutions below

1
On BEST ANSWER

Remember in iOS 4, your apps will remain running in the background by default even after you hit the home button (multitasking). You can disable this with an entry in the app's Info.plist.

Your getting the SIGTERM because your app is still running when you quit the simulator. You'll notice in Xcode that the "stop" button will still be active after you hit the home button.