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

升级Expo SDK 50后iOS项目构建失败求助

升级Expo SDK 50后iOS项目构建失败求助

大家好,我最近在把项目的Expo SDK从49升级到50,结果iOS端一直跑不起来,实在卡在这里了,想请教下各位大佬怎么解决😭

首先说下现状:pod install执行的时候完全没问题,没有报错,但是当我运行npx expo run:ios的时候,就弹出了编译错误,相同的错误内容重复出现了三次,具体如下:

❌  (ios/Pods/Target Support Files/Pods-Dmaze/ExpoModulesProvider.swift:8:8)

6 |  */
7 |
>  8 | import ExpoModulesCore
|        ^ compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4: /Users/marvin/Library/Developer/Xcode/DerivedData/Dmaze-eherjphdqufazvbjufezzvmfviqj/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule/arm64-apple-ios-simulator.swiftmodule
9 | import EXConstants
10 | import ExpoFileSystem
11 | import ExpoKeepAwake

最后统计下来是3个相同的错误,核心提示就是:我当前在为iOS 13.0编译项目,但依赖的ExpoModulesCore最低要求的部署目标是iOS 13.4。

但问题是我明明已经在Podfile里设置了iOS部署目标为13.4了啊,Podfile的相关代码片段如下:

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
require 'json'

pod 'AppAuth'

podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}

ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']

platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'

实在搞不懂为什么项目还是会以iOS 13.0的目标去编译,有没有朋友遇到过类似的问题?怎么才能让项目切换到13.4的目标去构建呢?

备注:内容来源于stack exchange,提问作者jrewing

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.20 07:19:33