I am building an app which uses the latest Facebook SDK (v3.1) and the Windows Azure iOS Toolkit SDK.
Now the Azure SDK requires adding the -all_load and -ObjC flags to the "Other Linker Flags" parameter in Build Settings. This is required to fix the known bug when linking against an Objective-C static libraries that contains categories (see http://developer.apple.com/library/mac/#qa/qa1490/_index.html). Without this setting the Azure SDK generates runtime exceptions of "selector not recognized" when calling certain methods. Fine, problem solved.
However, the Facebook SDK will not build with these flags set. It generates the following error when building:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SLComposeViewController", referenced from:
objc-class-ref in FacebookSDK(FBNativeDialogs.o)
"_SLServiceTypeFacebook", referenced from:
+[FBNativeDialogs composeViewControllerWithSession:handler:] in
FacebookSDK(FBNativeDialogs.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas on how to get these two libraries to play nicely together? One library wants the flags, and the other library won't build with those flags set.
Have you added the Social and Accounts Frameworks to your project?
Under Targets, General, Linked Frameworks and Libraries add:
Social.framework and Accounts.framework
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