ios - 在 RubyMotion 应用程序中使用 Facebook SDK
<p><p>我试图在我的 rubymotion 应用程序中包含 Facebook SDK,但出现以下错误:</p>
<blockquote>
<p>Undefined symbols for architecture i386:<br/>
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in FacebookSDK(FBSettings.o) "_OBJC_CLASS_$_SLComposeViewController", referenced from:
objc-class-ref in FacebookSDK(FBNativeDialogs.o) "_SLServiceTypeFacebook", referenced from:
+ in FacebookSDK(FBNativeDialogs.o) ld: symbol(s) not found for
architecture i386 clang: error: linker command failed with exit code 1
(use -v to see invocation) rake aborted! Command failed with status
(1): </p>
</blockquote>
<p>我已经尝试通过 cocoapod "Facebook-iOS-SKD"添加它</p>
<pre><code> app.pods do
pod "Facebook-iOS-SDK"
end
</code></pre>
<p>作为供应商项目</p>
<pre><code>app.vendor_project('vendor/FacebookSDK.framework', :static, :products => ['FacebookSDK'], :headers_dir => 'Headers')
</code></pre>
<p>我在这里做错了什么?如何让它正确链接?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>由于 Facebook SDK 3.1 具有特定于 iOS 6 的框架,因此我必须在 Rakefile 中将这些框架指定为“弱”。</p>
<pre><code>app.weak_frameworks += %w(AdSupport Social)
</code></pre>
<p>这要归功于 Laurent Sansonetti 的修复。</p></p>
<p style="font-size: 20px;">关于ios - 在 RubyMotion 应用程序中使用 Facebook SDK,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/12789907/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/12789907/
</a>
</p>
页:
[1]