当我将项目架构更新为 64 位时,会出现这些问题。我的部署目标是 7.1。
Undefined symbols for architecture x86_64: "OBJC_CLASS$RKClient", referenced from: objc-class-ref in AppDelegate.o objc-class-ref in SSRSuggestion.o "_OBJC_CLASS$RKObjectManager", referenced from: objc-class-ref in CinemaDetails-3BD8C6BC69EF1F23.o objc-class-ref in AppDelegate.o objc-class-ref in HomeScreen.o objc-class-ref in MovieDetails.o objc-class-ref in CinemaFilter-46E8309ACAC69139.o objc-class-ref in FilterView.o "_OBJC_CLASS$RKObjectMapping", referenced from: objc-class-ref in Cinema.o objc-class-ref in Movie.o objc-class-ref in Filter.o objc-class-ref in AppInfoModel.o "_OBJC_CLASS$RKParserRegistry", referenced from: objc-class-ref in SSRSuggestion.o "_OBJC_CLASS$RKRequestQueue", referenced from: objc-class-ref in CinemaDetails-3BD8C6BC69EF1F23.o objc-class-ref in AppDelegate.o objc-class-ref in MovieDetails.o "_OBJC_CLASS$_RKRequestSerialization", referenced from: objc-class-ref in SSRSuggestion.o "_RKMIMETypeJSON", referenced from: -[SSRSuggestion send_btn_pressed:] in SSRSuggestion.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
您似乎有旧版本的 RestKit
。最简单的方法可能是使用 CocoaPods。打开终端,输入:
$ sudo gem install cocoapods
然后在终端进入你的项目文件夹并输入:
$ pod init
打开 .podfile
并插入这一行:
pod 'RestKit', '~> 0.24'
保存并退出文件。在终端写:
$ pod install
从此时起,您应该使用 .xcwrokspace
而不是 .xcproj
。您还应该删除旧版本的 RestKit
。
另一种选择是使用 git submodules 或 hg subrepos。我不会在这里输入如何做的教程,因为它写得太多了,cocoapods对于新手来说更容易。
另一种选择是“手动”下载并添加到您的项目较新的 RestKit 版本 - 拖放。我不建议采用这种方式,因为您永远不知道自己使用的是哪个版本,而且您看不到使用过的框架有新的更新(显然经常会修复错误)。
关于ios - 当我将架构更新到 arm64 时,Restkit 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30912248/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |