我正在尝试将 Facebook SDK 实现到我的项目中,但我遇到了同样的问题
Facebook sdk is not a dylib error after update update Xcode 7?
嗯,我的 Bolts 目录中也有 Frameworks
在我的 Build Settings 中:Frameworks Search Path: ~/Documents/Frameworks/FacebookSDKs-iOS-4.27.0(这对我的路径是正确的)

在我的 Briding-Header.h

#import <Bolts/Bolts.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>

但是,我仍然遇到同样的错误,而且我刚刚删除了 Derived data

错误是:
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/Bolts.framework/Bolts is not a dylib
ld: warning: Auto-Linking supplied '/Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit', framework linker option at /Users/jarvis/Documents/Frameworks/FacebookSDKs-iOS-4.27.0/FBSDKLoginKit.framework/FBSDKLoginKit is not a dylib
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FBSDKApplicationDelegate", 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)

有人对这个错误有想法吗?

最佳答案

嗯,解决方案很奇怪,基本上,我删除了拖放到我的 Framework 组,并使用常规设置添加了 FBSDKCoreKitFBSDKLoginKitBolt ,将它们添加到 Linked Frameworks and Libraries

关于ios - Xcode 9 _OBJC_CLASS_$_FBSDKApplicationDelegate,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46454468/

10-10 21:07