【发布时间】:2016-04-27 01:11:39
【问题描述】:
[大量更新]
有人给我发了这个,它更容易阅读以便使用 React Native 安装 fbsdk:https://developers.facebook.com/docs/react-native/getting-started-ios
但是,问题还是一样:
Use of undeclared identifier 'UIUserInterfaceIdiomTV'
我猜这是来自 CocoaPods 提取的内容的错误,因为我能够通过简单地删除相同的 UIUserInterfaceIdiomTV 案例来使 sample example 工作(它曾经在一个开关中) )。
但是,按照指南中的每一步并最终删除 UIUserInterfaceIdiomTV,我在自己的项目中遇到了新的编译问题:Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKAppEvents", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_RCTRootView", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
如果有人可以帮忙...
感谢您的帮助!
【问题讨论】:
-
为了更清楚一点,我一直在尝试“Facebook SDK for iOS”中步骤的不同组合,因为我知道我应该跳过一些步骤,因为 Cocoapods 正在处理一些,但我不知道应该执行哪些步骤才能使编译正常工作。
-
我刚刚回答了一个类似的问题,看看这个:stackoverflow.com/questions/36904245/…希望对你有帮助。
-
您好,感谢您的帮助,但我什至无法编译我的项目。顺便说一下,当我尝试编译HelloFacebook sample 时,我得到了同样的错误......
-
嗨@Crysfel,我只是删除了 UIUserInterfaceIdiomTV 案例并让 HelloFacebook 工作。但是,我的应用程序中出现了新错误:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBSDKAppEvents", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from: objc-class-ref in AppDelegate.o "_OBJC_CLASS_$_RCTRootView", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
标签: ios xcode react-native cocoapods fbsdk