当我通过xcode5将我的应用程序部署到手机时,它可以找到,但是当我尝试将其部署到其中一个模拟器时,我会收到以下错误。
ld: warning: ignoring file /Users/benpearce/Downloads/MapKit.framework/MapKit, missing required architecture i386 in file /Users/benpearce/Downloads/MapKit.framework/MapKit (2 slices)
Undefined symbols for architecture i386:
"_MKCoordinateRegionMakeWithDistance", referenced from:
-[MapKitView createViewWithOptions:] in MapKit.o
"_OBJC_CLASS_$_MKMapView", referenced from:
objc-class-ref in MapKit.o
"_OBJC_CLASS_$_MKPinAnnotationView", referenced from:
objc-class-ref in MapKit.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有谁能看到发生了什么?
答案 0 :(得分:0)
MapKit
框架缺少模拟器的二进制文件,即i386。 Simulator是一个Mac应用程序,需要为i386 Intel处理器编译的代码资源。你从哪里得到MapKit?
如果这是Apple的MapKit,你应该只包括Xcode提供的框架。通过选择Project,Build Phases,Link Binaries with Libraries,+,选择MapKit.framework,在Xcode中添加它。
还有下载目录中的框架,为什么?