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

Expo切换至EAS Build遇iOS Pod安装失败及相关疑问咨询

Expo托管应用iOS构建Pod安装失败问题及相关咨询

问题背景

我有一个在模拟器上完全可用的Expo托管应用,3周前使用expo build:ios构建一切正常。1月4日Expo更新后该命令不再可用,转而使用npx eas build --platform ios构建,控制台流程看似正常,但构建详情显示安装Pods步骤失败,错误信息如下:

Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.18.1/bin/node
Auto-linking React Native modules for target `APP`: BVLinearGradient, RNCAsyncStorage, RNCMaskedView, RNGestureHandler, RNImageColors, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-contacts, react-native-maps, react-native-netinfo, and react-native-webview
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
[!] CocoaPods could not find compatible versions for pod "EXFirebaseCore":
  In Podfile:
    EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`)
Specs satisfying the `EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`)` dependency were found, but they required a higher minimum deployment target.
Error: Some pods require a higher minimum deployment target.
You can use the expo-build-properties config plugin to override the default native build properties and set a different minimum deployment target.

我删除了项目node_modules中的expo-firebase-core文件夹,但重新构建仍出现相同错误。此外我还安装了expo-firebase-recaptcha,它依赖"expo-firebase-core": "~6.0.0",请问这是否是错误原因?

同时想咨询两个问题:

  1. expo build与eas build的区别
  2. 托管工作流的构建为何需要安装Pods

问题解答

1. 关于expo-firebase-recaptcha依赖是否是错误原因

是。expo-firebase-recaptcha依赖expo-firebase-core@~6.0.0,这个版本的expo-firebase-core要求的iOS最低部署目标比你当前项目设置的要高。手动删除node_modules里的expo-firebase-core没用,因为构建时会根据依赖重新安装该包,且版本由expo-firebase-recaptcha锁定。

解决办法:使用expo-build-properties插件在app.json或app.config.js中提升iOS最低部署目标,比如设置为13.0或更高(具体匹配expo-firebase-core@6.0.0的要求)。

2. expo build与eas build的区别

  • expo build:旧版构建服务,基于Expo统一构建环境,配置选项有限,仅能满足基础构建需求,目前已逐步被EAS Build替代,部分功能停止维护。
  • eas build:Expo新一代构建服务,支持更灵活的配置,比如自定义构建环境、原生代码修改、依赖缓存、多渠道构建等,同时兼容托管工作流和裸工作流,是当前Expo官方推荐的构建方式。

3. 托管工作流的构建为何需要安装Pods

托管工作流虽无需手动管理原生代码,但构建过程中Expo会自动生成对应的iOS原生项目(包含Podfile),通过CocoaPods安装项目依赖的原生模块(比如你用到的expo-firebase-core、react-native-maps等)。这些原生模块是实现特定功能的基础,必须通过Pods管理和安装,最终才能打包成可分发的IPA文件。


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.05 03:50:22