I think this is an Xcode 4 issue, but I’m posting here to get confirmation.
My code (and consequently bhardy’s code from the downloadable answers) compiles just fine in Xcode 4. Run it in the simulator or on your device and everything is almost okay.
Of course, we’re testing data persistence and archiving with this chapter so you have to quit the Homepwner app from the multitasking bar (double click the home button, tap and hold on any app icon, then quit by tapping on the red minus). When performing this in Xcode 4 (either to simulator or testing on device) you get the familiar prompt that gdb has quit “(gdb)” in the console / debug area, but then if you launch the Homepwner app again from iOS spring board, it causes the main function to throw a SIGKILL exception.
I think this is an Xcode 4 specific failure, and now that I think about it, I should probably test with LLVM2 (nope same result).
The compiled app works just fine on iOS device and simulator at any point after that initial launch, quit, and SIGKILL.
Joe, do you all have any insight into this?