the codemonky

ramblings, musing and code snippets from shawn veader
Feb 05
Permalink

Running the iPhone 3.2 Beta… First Gotchas

I installed the 3.2 beta the other day to play with the new iPad simulator. (Neat stuff… more on that later.) But I tried working on one of my many half-completed iPhone apps the other night and ran into a few interesting problems.

The first problem I encountered was that the credentials in my app were not saving to the user defaults. I scratched my head a few times with this but did get some good testing out of it.

The second problem was the one that eventually led me to hitting Google in search of answers. After getting past some bugs I uncovered by not having user credentials, my app tried to load a standard table view. This table view has a custom cell loaded from a NIB. When the app tried to load this NIB, I was greeted with this wonderful message in the console.

uncaught exception ‘NSInvalidUnarchiveOperationException’, reason: ‘*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (UITableViewCellContentView)’

A few Google searches later and I found this response over on StackOverflow. However, I found it hard to believe that all of a sudden I needed to declare a class that was supposed to be built into the framework. I then started poking at XCode and the simulator and noticed something strange….

I had opened my project from the console (yes, I’m *that* guy) with the “open” command as I always do. Unbeknownst to me this opened the newer XCode out of the alternate install. This turned out to be the root of all my problems. I opened /Developer/Applications/XCode.app and BOOM everything started working again.

So if you’re running dual development environments, watch out!