You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native项目安装@react-native-firebase/auth后iOS构建失败求助

React Native Firebase Auth iOS编译失败解决方法
  • 清理缓存与重新安装依赖

    • 删除Xcode派生数据:执行rm -rf ~/Library/Developer/Xcode/DerivedData,也可通过Xcode偏好设置找到对应目录手动删除
    • 进入ios目录,执行pod deintegrate清除现有pod依赖,再重新运行pod install
  • 调整Xcode架构配置

    • 打开ios目录下的.xcworkspace文件
    • 选中项目根节点,在Build Settings中找到Architectures:
      • 设置Architectures为Standard Architectures (arm64, x86_64)
      • 确保Valid Architectures包含arm64和x86_64
    • 找到Build Active Architecture Only,将Debug模式设为YES,Release模式保持NO
  • 统一Firebase依赖版本

    • 检查package.json中@react-native-firebase/auth的版本,确保和其他Firebase相关包版本一致
    • 执行npm update @react-native-firebase/auth更新依赖,之后重新执行pod install
  • 确认iOS部署目标

    • 确保项目及Pods的iOS Deployment Target不低于13.0(Firebase当前最低要求),在Xcode的项目和Pods的Build Settings中统一设置
  • 彻底清理后重新构建

    • 关闭Xcode,在项目根目录执行npx react-native clean,再运行npx react-native run-ios

内容的提问来源于stack exchange,提问作者piupaul

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.25 13:12:51