【问题标题】:Adding FirebaseUI/Storage pod to iOS App throws framework not found SDWebImage for architecture x86_64将 FirebaseUI/Storage pod 添加到 iOS 应用程序会引发未找到架构 x86_64 的 SDWebImage 框架
【发布时间】:2017-04-18 02:56:13
【问题描述】:

我正在尝试将 FirebaseUI/Storage pod 添加到引发以下链接器错误的 iOS 应用程序:

未找到适用于 x86_64 架构的 SDWebImage 框架

我尝试单独添加 SDWebImage 并且它可以工作,但是一旦我添加 FirebaseUI/Storage pod,它就会引发上述错误。

有什么可能导致这种情况的想法吗?

这就是我的 Podfile 的样子:

target 'myApp' do

pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'

pod 'FirebaseUI/Storage'

pod 'SDWebImage'
pod 'MMDrawerController'

end

【问题讨论】:

  • 介意分享更多信息(Podfile、pod install 输出、版本号等)?
  • 您不应该需要第二个SDWebImage,因为它应该从FirebaseUI/Storage 自动拉入。您使用的是哪个版本的 CocoaPods?另外,这是 Obj-C 还是 Swift?如果你需要的话,你有use_frameworks!吗(正在使用 Swift)。
  • 我正在使用最新版本的 CocoaPods。这是 Obj-C。

标签: ios firebase sdwebimage firebase-storage firebaseui


【解决方案1】:

我遇到了同样的问题。我似乎已经通过将我的 pod 文件更改为...来修复它。

target 'MyApp' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for MyApp
  pod 'SDWebImage', '~>3.8'
  # pod 'Firebase/Core'
  pod 'FirebaseUI', '~> 1.0'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MyAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

需要注意的几点:

  1. 即使我使用的是 Objective C,我也打开了 use_frameworks
  2. 我关闭了 Firebase pod 调用 - FirebaseUI 会自动将它们拉入

【讨论】:

  • 这似乎是 CocoaPods 中的一个问题。如果您省略 use_frameworks!,则正确包含 SDWebImage,但 pods 添加链接器标志,然后期望 SDWebImage 以框架形式存在。见github.com/firebase/FirebaseUI-iOS/issues/194
  • 你拯救了我的一天。如果您取消注释“use_frameworks!”,它会起作用!
【解决方案2】:

似乎没有明确的文档说明要包含哪些 pod 以仅启用 FirebaseUI/Storage 功能(如果还包括其他单个 Firebase/... pod)。

我需要删除所有 pod 并在没有 FirebaseUI/Storage 的情况下重新安装它们,因为它欺骗了几个在我删除 [FirebaseUI/Storage] pod 后没有被删除的类。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-04-11
    • 2016-04-20
    • 1970-01-01
    • 2018-03-11
    • 2017-03-29
    • 2018-10-30
    • 1970-01-01
    相关资源
    最近更新 更多