Monthly Archives: April 2011

How to “add existing frameworks” in XCode 4

Here is the step by step instructions:

  1. In the project navigator, select your project
  2. Select your target
  3. Select the ‘Build Phases’ tab
  4. Open ‘Link Binaries With Libraries’ expander
  5. Click the ‘+’ button
  6. Select your framework
  7. (optional) Drag and drop the added framework to the ‘Frameworks’ group


cannot decode object of class (MKMapView)


*** Terminating app due to uncaught exception ‘NSInvalidUnarchiveOperationException’, reason: ‘*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)’


add the “MapKit.framework” library.

How to enable “swipe to delete” for UITableViewCell

- (UITableViewCellEditingStyle)tableView:(UITableView *)aTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
// No editing style if not editing or the index path is nil.
if (self.editing == NO || !indexPath) return UITableViewCellEditingStyleDelete;

Server certificate verification failed

Got the following issue when trying to commit changes to SVN server:

svn: OPTIONS of ‘’: Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (

I’m using svnX, and it seems there is no way to get around this issue. I searched the web but found no solution.

Finally, I tried to update the svn working copy in terminal:

$ svn up

Error validating server certificate for ‘’:

– The certificate is not issued by a trusted authority. Use the

fingerprint to validate the certificate manually!

– The certificate hostname does not match.

Certificate information:

– Hostname: langui-server

– Valid: from Wed, 20 Apr 2011 15:08:48 GMT until Thu, 19 Apr 2012 15:08:48 GMT

– Issuer:

– Fingerprint: e6:52:b9:b6:f2:35:68:6c:cd:93:ef:b2:f3:15:02:dd:85:2b:1f:28

(R)eject, accept (t)emporarily or accept (p)ermanently? p

At revision 49.

Then try agin with svnX, it works!

Xcode warning: No provisioned iOS devices are available

I got this warning when trying to deploy my App into my iPhone 4: “No provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination.”

After some googling I found the answer: the default target was set to 4.3 but my iPhone iOS version is 4.2.

I edited the target and set “Base SDK” to “iOS 3.2”, then everything is ok.

Seems it’s time to update my iPhone now.