2017-02-25 80 views
0

使用使用(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 
+0

您是否嘗試過[該解決方案(http://stackoverflow.com/a/32652721/5329717)? –

+0

@ Kamil.S是的,但問題是xcode趕上!該框架是在Xcode捕獲錯誤的配置! – shaibow

回答

0

問題是Xcode的趕上!

這個框架(這是i386)有一個默認的構建,並且在構建Xcode捕獲它以開發文件之後!

嘗試通過命令+ Option + Shift鍵+ K :)

清潔,不要忘記設置架構SDK到iOS在Xcode中豆莢圖表!

無需二元框架添加到您的目標(如寫在github上)

相關問題