在 Xcode 中使用 Mapkit 时出错?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1550187/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting error when using Mapkit in Xcode?
提问by Rahul Vyas
NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)
NSInvalidUnarchiveOperationException',原因:'*** -[NSKeyedUnarchiver decodeObjectForKey:]:无法解码类的对象 (MKMapView)
I am getting this error.Have I missed something?
我收到此错误。我错过了什么吗?
I don't know from where to add Mapkit framework. First I tried with target->getInfo
and then from the bottom + sign added framework but that did not work. Then I searched in a spotlight and added another framework. By adding this it removed previous error but gives the above one.
我不知道从哪里添加 Mapkit 框架。首先,我尝试使用target->getInfo
,然后从底部 + 符号添加框架,但这没有用。然后我在聚光灯下搜索并添加了另一个框架。通过添加它,它消除了以前的错误,但给出了上述错误。
What is the exact location of Mapkit framework? I want to test it in simulator.
Mapkit 框架的确切位置是什么?我想在模拟器中测试它。
回答by
Frameworks (assuming 3.x) are in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks
框架(假设 3.x)位于 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks
回答by daidai
With Xcode 3.2, MapKit is pre-populated in the Add → Existing Frameworks… dialog and simply requires selecting MapKit from the list.
在 Xcode 3.2 中,MapKit 预先填充在 Add → Existing Frameworks... 对话框中,只需从列表中选择 MapKit。
from http://cs491f09.wordpress.com/2009/10/30/assignment-6-adding-the-mapkit-framework/
来自http://cs491f09.wordpress.com/2009/10/30/assignment-6-adding-the-mapkit-framework/