【问题标题】:React Native and RNFirebase iOS Release Builds FailingReact Native 和 RNFirebase iOS 版本构建失败
【发布时间】:2018-10-09 20:28:42
【问题描述】:

我在 React Native 中通过 RNFirebase 使用 Firebase。我已经完成了这里的步骤:https://rnfirebase.io/docs/v5.x.x/installation/ios

在模拟器和我的设备上调试构建工作正常,但是当我尝试归档发布构建时,它会失败并出现此错误。

ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/FirebaseAuth'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/GoogleUtilities'
ld: warning: directory not found for option '-L/Users/rob5408/Library/Developer/Xcode/DerivedData/myApp-fggubxxejruuksefqfhjorhysodz/Build/Intermediates.noindex/ArchiveIntermediates/myApp/BuildProductsPath/Release-iphoneos/nanopb'
ld: library not found for -lFirebaseAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)

此外,在构建日志中,我可以看到调试配置构建了这些目标,但它们不在发布配置构建的输出中。我觉得它与构建所有架构有关,但不知道如何开始解决这个问题。我只是觉得我在四处闲逛,没有真正的策略来解决它。有什么想法吗?

我尝试过的一些事情......

  • 使用旧版构建系统
  • 删除 node_modules 并重新运行 npm install
  • 删除/添加相关的 pod
  • 分解和读取 Cocoapods
  • 清除 DerivedData
  • 重新启动我的电脑

【问题讨论】:

    标签: ios firebase react-native react-native-firebase


    【解决方案1】:

    我已经看到在关闭和打开use_frameworks! 时会发生这种情况。

    解决方案是从 Build Setting - Other Linker Flags(OTHER_LDFLAGS) 中删除 FirebaseAuth 和其他库

    【讨论】:

    • 感谢您的建议,我确实尝试过这个,然后才想到 .frameworks 会救我。也许它是这个带有 RN 升级的 Legacy Build System 的组合。
    【解决方案2】:

    我从这个 PR 得到了帮助:https://github.com/invertase/react-native-firebase-starter/pull/61

    这是在 Xcode 10 中下降到旧版构建系统并将 React Native 升级到 0.57.2 的组合。

    【讨论】:

      猜你喜欢
      • 2019-06-06
      • 2019-08-16
      • 2016-10-27
      • 2017-09-09
      • 2021-12-16
      • 2021-02-04
      • 1970-01-01
      • 1970-01-01
      • 2021-06-13
      相关资源
      最近更新 更多