使用(IOS-图表)框架在Xcode 8.2.1 cuasing苹果Mach-O的连接错误
问题描述:
使用使用(IOS-图表)框架在Xcode 8.2.1 cuasing苹果Mach-O的连接错误
danielgindi /图表
Framework版本IM:3.0.1在我的obj-c项目中。
所有其他框架都在迅速(如AFNetworking),但在这个框架我得到了一些错误,如:
error: /Users/pooya/Library/Developer/Xcode/DerivedData/MY-Project/Build/Products/Debug-iphoneos/Charts.framework: No such file or directory
当我试图建立我的实际设备(iPhone 7)对这个错误发生!
但是,当我试图在一些64位模拟器(如iPhone 6S仿真器)运行它,我得到这个错误:
ignoring file /Users/pooya/Library/Developer/Xcode/DerivedData/ZF_Vendor-cgqfmefljmubdqfloevghfslaasp/Build/Products/Debug-iphonesimulator/Charts.framework/Charts, file was built for i386 which is not the architecture being linked (x86_64): /Users/pooya/Library/Developer/Xcode/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/Charts.framework/Charts
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$__TtC6Charts12BarChartData", referenced from:
objc-class-ref in ChartsViewController.o
"_OBJC_CLASS_$__TtC6Charts15BarChartDataSet", referenced from:
objc-class-ref in ChartsViewController.o
"_OBJC_CLASS_$__TtC6Charts17BarChartDataEntry", referenced from:
objc-class-ref in ChartsViewController.o
"_OBJC_CLASS_$_ChartDefaultValueFormatter", referenced from:
objc-class-ref in ChartsViewController.o
"_OBJC_CLASS_$_ChartDefaultAxisValueFormatter", referenced from:
objc-class-ref in ChartsViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
但在iPhone 5和其他32位模拟器它做工精细:|
我正在寻找3天,找不到任何帮助!
我通过cocapods添加了这个框架,这个配置:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
答
问题是Xcode的赶上!
这个框架(这是i386)有一个默认的构建,并且在构建Xcode捕获它以开发文件之后!
尝试通过命令+ Option + Shift键+ K :)
清洁,不要忘记设置架构SDK到iOS在Xcode中豆荚图表!
无需二元框架添加到您的目标(如写在github上)
您是否尝试过[该解决方案(http://stackoverflow.com/a/32652721/5329717)? –
@ Kamil.S是的,但问题是xcode赶上!该框架是在Xcode捕获错误的配置! – shaibow