ios - Xcode Undefined symbols for architecture x86_64 for FBAudienceNetwork

标签 ios xcode facebook

当我在我的 xcode 项目中将我的 facebook sdk 从 4.5.1 升级到 4.13.1 时,我遇到了这个问题。

我已经替换了那些 Facebook SDK 文件: Bolts, FBAudienceNetwork, FBSDKCoreKit, FBSDKLoginKit, FBSDKMessengerShareKit, FBSDKShareKit 然后我通过以下方法从 FBAudienceNetwork 得到 architecture x86_64 的 undefined symbol :

"_xmlFreeDoc", referenced from:

"_xmlLastError", referenced from:

"_xmlReadMemory", referenced from:

"_xmlXPathCastToBoolean", referenced from:

"_xmlXPathCastToNumber", referenced from:

"_xmlXPathCastToString", referenced from:

"_xmlXPathCompile", referenced from:

"_xmlXPathCompiledEval", referenced from:

"_xmlXPathFreeCompExpr", referenced from:

"_xmlXPathFreeContext", referenced from:

"_xmlXPathFreeObject", referenced from:

"_xmlXPathNewContext", referenced from:

"_xmlXPathRegisterNs", referenced from:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

我通过在我的项目中手动包含 libxml2.dylib 来解决这个问题。

我将为遇到此问题的任何人提供步骤。

  1. 单击 Xcode 项目 Pane 顶部的文件夹,然后选择项目中的第一项(它通常带有 xcode 图标)。

enter image description here

  1. 点击常规标签并找到“Linked Frameworks and Libraries

enter image description here

  1. 一直滚动到Linked Frameworks and Libraries 的底部,然后点击底部的加号以添加新框架

enter image description here

  1. 在框架选择窗口点击添加其他

enter image description here

  1. 将打开一个基本的浏览/选择文件窗口,单击左侧的 Macintosh HD(可选,但它会确保您在正确的位置)

enter image description here

  1. 按 CMD+SHIFT+G 调出转到文件夹窗口。

enter image description here

  1. 在此文件夹中,找到文件 libxml2.dylib 并双击它。

enter image description here

  1. 为了安全起见,保存、清理和重建,您应该一切顺利。

关于ios - Xcode Undefined symbols for architecture x86_64 for FBAudienceNetwork,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38176642/

相关文章:

iphone:-使用 UILocalNotification 声音播放录制的语音

ios - 未找到模块 'path_provider'

iphone - 当输入文本时,UITextView 在 UIScrollView 内部滚动父级

objective-c - xcode 即时创建 uiviewcontrollers

php - 允许用户使用他们的 Facebook 帐户在我的网站中发表评论,而无需在我的网站中为他们创建帐户?

ios - SLRequest 进度回调(iOS 6)

facebook - 不同于类似于 edge.create 的事件

ios - 如何使用 swift 在 ios 设备上发送自动电子邮件?

ios - 为什么我的函数输出一个看起来像内存地址的随机值?

ios - 无法通过 Swift 中的计数器循环