Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not instantiate class named MKMapView

I ran into this too, but I was able to get past it by following the instructions of step 2 in your link (thanks, by the way):

  1. Add the MapKit framework to the project. (Control + Click Frameworks folder -> Add -> Existing Frameworks)

I just searched for MapKit.framework, added it to the project, and the error went away.

I haven't added any map code yet (although I do have a MapViewDelegate connected in IB), but it's working fine so far!


Click on your project to bring the project settings. Under Targets, click your project, select from the upper toolbar "Build Phases". Under "Link binary With Libraries" tab, you will see the list of frameworks included in your project. Click the "+" button and add MapKit library from the shown list to your project.


For Xcode 6.1:

  • Select your project
  • In general tab, look for Linked Frameworks and Libraries (last one)
  • Press + button
  • Search MapKit.framework
  • Finally add

Easy way!

Works above Xcode version 7.2

As far as I'm concerned selecting the MAPS from capabilities will automatically link your framework to your project all you have to do is check the Maps button in Capabilities -> Maps.

Heres the attached screenshot. Cheers!!

enter image description here