我试图在我的 rubymotion 应用程序中包含 Facebook SDK,但出现以下错误:
Undefined symbols for architecture i386:
"_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:
+[FBNativeDialogs composeViewControllerWithSession:handler:] 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): [/Applications/Xcode.app/Contents/Developer...]
我已经尝试通过 cocoapod "Facebook-iOS-SKD"添加它
app.pods do
pod "Facebook-iOS-SDK"
end
作为供应商项目
app.vendor_project('vendor/FacebookSDK.framework', :static, :products => ['FacebookSDK'], :headers_dir => 'Headers')
我在这里做错了什么?如何让它正确链接?
Best Answer-推荐答案 strong>
由于 Facebook SDK 3.1 具有特定于 iOS 6 的框架,因此我必须在 Rakefile 中将这些框架指定为“弱”。
app.weak_frameworks += %w(AdSupport Social)
这要归功于 Laurent Sansonetti 的修复。
关于ios - 在 RubyMotion 应用程序中使用 Facebook SDK,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/12789907/
|