I get: Application termination due to an uncaught exception "NSInvalidUnarchiveOperationException", reason: "Could not instantiate class called MKMapView"

Of course, I googled and used search on stackoverflow. I found several similar discussions:

Failed to instantiate class named MKMapView

http://forums.bignerdranch.com/viewtopic.php?f=49&t=490

NSInvalidUnarchiveOperationException: Unable to decode class object (UITableViewCellContentView)

... and many copies of this:

However, I do not use SDK 3.2, but 5.0 (one of the related discussions suggests that it was a bug in some beta version of SDK 3.2).

Other discussions and answers suggest that the MapKit framework has not been included properly. I tried to enable it in several ways by following these instructions.

I am still getting this error. He is on

    [super loadView];

inside my own view controller

- (void)loadView {

method. The view itself is created inside IB. Next to other elements is MKMapView.

I use MKMapView in my two xcode projects. Both of them were launched in xcode 3.2 and are now ported to xcode 4. In one of the projects, the code works fine, and in the other I get this runtime error. I did not find a significant difference between the settings of these projects, which could explain this different behavior to me.

- ( IB), . , :)

.

+5
2

- , . " ", " ". , MapKit.framework , .

+8

Xcode 7.2 add Framework .

1. + icon → MapKit → "".

2. → "" → " " .

3. + icon → MapKit → "".

0

All Articles