找不到Firebase框架

Joã*_*nte 7 ios cocoapods firebase swift

我一直在尝试将我的项目迁移到cocoapods.

我觉得我几乎就在那里,但我陷入了困境:

ld:找不到框架架构x86_64的Firebase错误:链接器命令失败,退出代码为1(使用-v查看调用)

我正在尝试使用我的"app.xcworkspace"进行编译,项目如下所示:

项目导航器

也:

图书馆

我尝试过启动其他项目和firebase工作,所以这个项目设置有问题......有什么想法吗?

我的podfile看起来像这样:

# Uncomment this line to define a global platform for your project
# platform :ios, ‘8.0’

target 'Parti' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!

  # Pods for Parti

    pod 'Firebase'
    pod 'Firebase/Storage'
    pod 'Firebase/Auth'
    pod 'Firebase/Database'

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

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

end
Run Code Online (Sandbox Code Playgroud)

可能有必要补充说,当xcode尝试"链接/Users/myname/Library/Developer/Xcode/DerivedData/Parti-gsdsljzobcnqjkgutfpjasgrsfck/Build/Products/Debug-iphonesimulator/Parti.app/Parti"时会发生错误.

Ida*_*dan 5

我知道听起来很不错,但是:

  1. 清理项目.产品 - >清洁
  2. 重启XCode(并非总是需要)
  3. 运行pod updatepod install从项目文件夹

更新:Podfile应该更喜欢:

    use_frameworks!

    target 'Parti' do
      pod 'Firebase'
      pod 'Firebase/Storage'
      pod 'Firebase/Auth'
      pod 'Firebase/Database'
    end

    target 'PartiUITests' do
      pod 'Firebase'
      pod 'Firebase/Storage'
      pod 'Firebase/Auth'
      pod 'Firebase/Database'
    end
Run Code Online (Sandbox Code Playgroud)

  • `pod update && pod install`为我工作,谢谢:) (3认同)

Joã*_*nte 1

刚刚找到答案。好像我有一个旧的 geofire 版本,而新版本还不能作为 Pod 使用......

Github 问题链接

谢谢您的回答。