Benjamin RD
Benjamin RD

Reputation: 12044

Xcode 9 _OBJC_CLASS_$_FBSDKApplicationDelegate

I'm trying to implement Facebook SDK into my project and I get the same issue Facebook sdk is not a dylib error after update update Xcode 7? Well, I have Bolts in my Frameworks Directory, also

In my Build Settings: Frameworks Search Path: ~/Documents/Frameworks/FacebookSDKs-iOS-4.27.0 (That is correct for my path)

In my Briding-Header.h

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

But, I'm still getting the same error, also, I just deleted the Derived data.

The error is:

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)

Some one has an idea about this error?

Upvotes: 4

Views: 3398

Answers (4)

Artem Listopadov
Artem Listopadov

Reputation: 1

Another solution is to delete these files in the project folder:enter image description here

  • pod install

Upvotes: 0

Irtaza fayaz
Irtaza fayaz

Reputation: 478

I also got this error and cleaning the project and building it again 4-5 times worked for me.

  • Cleaning - Command + Shift + K

  • Building - Command + B

Upvotes: 3

schalouh
schalouh

Reputation: 45

instead of using the method described in FB official reference, I used pods to install them and I easily got rid of this problem

Upvotes: -1

Benjamin RD
Benjamin RD

Reputation: 12044

Well, the solution was weird, basically, I removed the Drag and Drop to my Framework group, and I added the FBSDKCoreKit, FBSDKLoginKit and Bolt using the general settings adding them in Linked Frameworks and Libraries

Upvotes: 3

Related Questions