xcode linking issue when using Facebook SDK and Windows Azure SDK

你离开我真会死。 提交于 2019-12-22 05:30:19

问题


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.


回答1:


Have you added the Social and Accounts Frameworks to your project?




回答2:


Under Targets, General, Linked Frameworks and Libraries add:

Social.framework and Accounts.framework



来源:https://stackoverflow.com/questions/14133153/xcode-linking-issue-when-using-facebook-sdk-and-windows-azure-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!