使用cocoapods的XCode项目因arm64缺失拱而突然爆发

时间:2013-11-28 21:22:51

标签: ios objective-c xcode cocoapods arm64

我一直致力于使用CocoaPods的项目数周:

platform :ios, '7.0'
pod 'SVProgressHUD', '~>1.0'
pod 'Reachability', '~> 3.1.1'
pod 'UIDevice-Hardware', '~> 0.1.3'

podfile几周没有变化。但是,今天我突然遇到了构建错误,我无法解决错误或构建突然失败的原因。

ld: warning: ignoring file /Users/jim/Library/Developer/Xcode/DerivedData/App-bgzqwpbxhsvbvmhdfdvgafjurltc/Build/Products/Debug-iphoneos/libPods.a, missing required architecture arm64 in file /Users/jim/Library/Developer/Xcode/DerivedData/App-bgzqwpbxhsvbvmhdfdvgafjurltc/Build/Products/Debug-iphoneos/libPods.a (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SVProgressHUD", referenced from:
      objc-class-ref in BCRegisterViewController.o
  "_OBJC_CLASS_$_MSClient", referenced from:
      objc-class-ref in BCCentralService.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何想法都可能出错?我查看了所有项目和目标,并将64位列为有效架构。

1 个答案:

答案 0 :(得分:3)

我遇到了同样的问题。对我来说,问题是Pods项目(在共享工作区中)没有设置为arm64构建。

要解决此问题,请单击Pods项目,然后更改整个项目和每个目标的设置以包含arm64:

arm64 architectures pod 64-bit build cocoapods

这将构建所有支持arm64的pod,这将解决链接器错误。