Reputation: 506
I'm currently using the latest Facebook SDK, Parse SDK and Xcode. The Parse SDK frameworks were copied to my project while the Facebook SDK frameworks were referenced. I'm using Bolts.framework that was provided by Facebook and I connected my Parse account with my Facebook App.
The problem is when I try to implement Inside my AppDelegate.m file (after the Parse setApplicationId of course):
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:launchOptions];
my app crashes with the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:]: unrecognized selector sent to class 0x102c060b0'
These are the header files I included:
#import <Parse/Parse.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <ParseFacebookUtilsV4/PFFacebookUtils.h>
When I'm using the normal Facebook SDK alone it works fine - I can login using Facebook login button. When Parse comes into play with it's PFFacebookUtils class, I just had horrible experience. At first I couldn't even build the project because of linker errors which were fixed using this solution: https://stackoverflow.com/a/18626232/3608136
I've tried every solution in Stackoverflow, but I can't figure it out. Here is how my "Search Paths" look:
$(inherited)
$(PROJECT_DIR)/parse-library-1
/Users/me/Documents/FacebookSDK
Everything related to Parse is in parse-library-1. By the way, needless to say.. when I try to user other methods like logInInBackgroundWithReadPermissions it crashes.
Upvotes: 2
Views: 1035
Reputation: 1104
You can try to add "-ObjC" flag to Other Linker Flags section in project settings.
Its happens to me with another framework and the solution was that!
I hope it helps!
Upvotes: 2