代码之家  ›  专栏  ›  技术社区  ›  rob5408

React本机和RNFirebase iOS版本生成失败

  •  2
  • rob5408  · 技术社区  · 7 年前

    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
    • 脱胶和阅读椰子荚
    • 清除衍生数据
    2 回复  |  直到 7 年前
        1
  •  2
  •   Paul Beusterien    7 年前

    我在切换时看到过这种情况 use_frameworks! 断断续续地。

    解决方案是从生成设置中删除FirebaseAuth和其他库-其他链接器标志(其他\u LDFLAGS)

        2
  •  0
  •   rob5408    7 年前

    https://github.com/invertase/react-native-firebase-starter/pull/61

    这是一个下拉到Xcode 10中的遗留构建系统和将React Native升级到0.57.2的组合。

    推荐文章