Reputation: 1109
I'm currently trying to use the Facebook SDK official pod in its 3.14.1 version (also tried 3.9, same result) but I stumble upon an issue.
Here is my code:
self->_session = [[FBSession alloc] initWithAppID:[[self class] facebookAppId]
permissions:self.mandatoryPermissions
urlSchemeSuffix:nil
tokenCacheStrategy:[FBSessionTokenCachingStrategy defaultInstance]];
[self->_session openWithBehavior:FBSessionLoginBehaviorWithFallbackToWebView
completionHandler:^(FBSession *session,
FBSessionState state,
NSError *error)
{
[self sessionStateChanged:session
state:state
error:error];
}];
This is greatly inspired from code samples given by facebook : https://developers.facebook.com/docs/facebook-login/ios/v2.0 # Step 1b: Open the session using the custom class
Here is the issue :
dyld: lazy symbol binding failed: Symbol not found: _OSAtomicDecrement32
Referenced from: /var/mobile/Applications/01DD5CE2-39A9-40AE-A8FC-170F7387D434/Dubb.app/Dubb
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _OSAtomicDecrement32
Referenced from: /var/mobile/Applications/01DD5CE2-39A9-40AE-A8FC-170F7387D434/Dubb.app/Dubb
Expected in: /usr/lib/libSystem.B.dylib
By looking at their SDK code I can't see fallbacks for the OSAtomicDecrement32
in case it doesn't exist, and it in fact exists sstarting with iOS 7.1.
Any advice?
Thanks
Upvotes: 10
Views: 421
Reputation: 1109
I actually understood what happened here after having the same issue on iOS7.0.
The call OSAtomicIncrement32 is defined as its own function on iOS >= 7.1, but it is also defined as an inline call to other functions for iOS < 7.1.
The right definition is used depending on the min deployment target, which for me was set to '7.1' in my podfile. Changing it to:
platform :ios, '7.0'
fixed the issue!
Upvotes: 2
Reputation: 12106
I deleted and then re-installed my pods.
Then I had to change one #import statement from:
#import <FacebookSDK/Facebook.h>
to
#import <FacebookSDK/FacebookSDK.h>
Rebuilt everything, and it worked.
Upvotes: 0