cannot decode object of class (MKMapView)

Problem:

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

Solution:

add the “MapKit.framework” library.

  1. Where exactly is the facebook like button ?

  2. I did add the MapKit framework but the problem resists.

    Did restart xcode, touched all related source files to enforce their compilation but the problem persists.

    Any tips?

    • How did you add it? Adding it in Build Phases / Link Binary With Libraries (Xcode 4.1) worked for me to solve this error.

      • Yes, that’s the way to add framework to a project in Xcode 4 :)
        In Xcode 3: right click on the “Frameworks” folder -> “Add” -> “Existing Frameworks…”.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.