我在 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
我已经看到在关闭和打开 use_frameworks!
时会发生这种情况。
解决方案是从 Build Setting - Other Linker Flags(OTHER_LDFLAGS) 中删除 FirebaseAuth 和其他库
关于ios - React Native 和 RNFirebase iOS 版本构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52728848/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |