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
The Facebook SDK enables: Facebook Login - Authenticate people with their Facebook credentials. Share and Send dialogs - Enable sharing content from your app to Facebook. App Events - Log events in your application.
The Facebook SDK includes code to access Apple's Advertising Identifier (IDFA), but that code is only executed in certain situations.
The central component of the iOS SDK is Xcode, Apple's interactive development environment (IDE). Xcode facilitates building apps for OS X, iOS and WatchOS. Xcode includes the interface, the LLVM compiler, instruments and iOS simulator tools that make development and testing possible without an Apple device.
If you want to use ad objectives other than App Installs, you will need to implement the Facebook SDK for your platform in your app. Learn more.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With