Reputation: 632
I've seen similar questions on this but cannot find an answer. I need to use the Facebook SDK
with Parse
. I am using the very latest Parse SDK and the very latest Facebook SDK. I have followed the instructions on Parse.com on using Facebook with Parse very closely which means I have dragged the Parse AND Bolts frameworks into my project.
When I build my project I get a Linking error:
Undefined symbols for architecture x86_64: "_FBTokenInformationExpirationDateKey", referenced from: -[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) "_FBTokenInformationTokenKey", referenced from: -[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) "_FBTokenInformationUserFBIDKey", referenced from: -[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) -[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) "_OBJC_CLASS_$_FBAppCall", referenced from: objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o) "_OBJC_CLASS_$_FBRequest", referenced from: objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o) "_OBJC_CLASS_$_FBSession", referenced from: objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o) "_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from: _OBJC_CLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o) "_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from: _OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried having -ObjC
in my Link Flags under Project settings and it makes no difference either way. Does anyone know how I can get round this?
I did look at this post
Parse for iOS: Errors when trying to run the app
but nothing suggested there worked for me (I need the Facebook functionality in my app so I can't bypass it and I have trued the -ObjC flag thing and also the Accounts and Social frameworks thing - nothing gets rid of my error!)
Upvotes: 9
Views: 3882
Reputation: 705
I have solved this issue using Akram's answer.Here is what i exactly did In a simple way id did this in my Podfile.
pod 'Parse'
pod 'ParseFacebookUtilsV4'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
Note : Remove other frameworks if you have manually added for parse integration.
Upvotes: 0
Reputation: 81
I also had the same error. This is what I did to fix it ...
I deleted all of the existing Parse frameworks from my project. I was using Parse version 1.6.1 frameworks from January 2015. This included:
After deleting those, I downloaded the latest Parse SDK (1.7.4), and then did a drag-and-drop of these frameworks into my project:
Then I downloaded the latest & greatest FacebookSDK (FacebookSDKs-iOS-20150528.pkg), and did a drag-and-drop of these frameworks into my project:
Everything seems to work now. Note that I am linking Accounts.framework and Social.framework, and I am not using the -ObjC flag.
Upvotes: 8
Reputation: 521
I had the same error, just make sure you delete ParseFacebookUtils.framework
library from your project and keep only ParseFacebookUtilsV4.framework
.
Upvotes: 37