ios - 当我将架构更新到 arm64 时,Restkit 失败
<p><p>当我将项目架构更新为 64 位时,会出现这些问题。我的部署目标是 7.1。</p>
<blockquote>
<p>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)</p>
</blockquote></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>您似乎有旧版本的 <code>RestKit</code>。最简单的方法可能是使用 <strong>CocoaPods</strong>。打开终端,输入:</p>
<pre><code>$ sudo gem install cocoapods
</code></pre>
<p>然后在终端进入你的项目文件夹并输入:</p>
<pre><code>$ pod init
</code></pre>
<p>打开 <code>.podfile</code> 并插入这一行:</p>
<pre><code>pod 'RestKit', '~> 0.24'
</code></pre>
<p>保存并退出文件。在终端写:</p>
<pre><code>$ pod install
</code></pre>
<p>从此时起,您应该使用 <code>.xcwrokspace</code> 而不是 <code>.xcproj</code>。您还应该删除旧版本的 <code>RestKit</code>。</p>
<hr/>
<p>另一种选择是使用 <strong>git submodules</strong> 或 <strong>hg subrepos</strong>。我不会在这里输入如何做的教程,因为它写得太多了,cocoapods对于新手来说更容易。</p>
<hr/>
<p>另一种选择是“手动”下载并添加到您的项目较新的 RestKit 版本 - 拖放。我<strong>不建议</strong>采用这种方式,因为您永远不知道自己使用的是哪个版本,而且您看不到使用过的框架有新的更新(显然经常会修复错误)。</p ></p>
<p style="font-size: 20px;">关于ios - 当我将架构更新到 arm64 时,Restkit 失败,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/30912248/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/30912248/
</a>
</p>
页:
[1]