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

升级Expo SDK至51后,iOS生产环境(TestFlight)卡在Splash Screen

Expo SDK49升级至51后iOS生产环境(TestFlight)卡在启动页问题

将使用托管工作流(managed workflow)的Expo App从SDK49升级至51,此前SDK49版本运行正常,但升级后App卡在启动页(Splash Screen)。该问题仅出现在iOS生产环境(TestFlight)中,目前仅针对iOS端进行生产部署。

项目依赖项

"dependencies": {
    "@apollo/client": "^3.10.4",
    "@expo/vector-icons": "^14.0.2",
    "@react-native-async-storage/async-storage": "^1.23.1",
    "@react-navigation/bottom-tabs": "^6.5.20",
    "@react-navigation/native": "^6.1.17",
    "@react-navigation/stack": "^6.3.29",
    "@stripe/stripe-react-native": "0.37.2",
    "axios": "^1.5.1",
    "expo": "^51.0.11",
    "expo-apple-authentication": "^6.4.1",
    "expo-asset": "^10.0.8",
    "expo-auth-session": "^5.5.2",
    "expo-av": "^14.0.5",
    "expo-crypto": "^13.0.2",
    "expo-dev-client": "^4.0.15",
    "expo-device": "^6.0.2",
    "expo-font": "^12.0.7",
    "expo-haptics": "^13.0.1",
    "expo-image-manipulator": "^12.0.5",
    "expo-image-picker": "^15.0.5",
    "expo-linking": "^6.3.1",
    "expo-location": "^17.0.1",
    "expo-notifications": "^0.28.7",
    "expo-random": "^14.0.1",
    "expo-secure-store": "^13.0.1",
    "expo-splash-screen": "^0.27.5",
    "expo-updates": "^0.25.16",
    "expo-web-browser": "^13.0.3",
    "geolib": "^3.3.4",
    "graphql": "^15.8.0",
    "graphql-request": "^6.1.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-is": "^18.2.0",
    "react-native": "0.74.2",
    "react-native-gesture-handler": "^2.16.2",
    "react-native-get-random-values": "^1.11.0",
    "react-native-maps": "1.14.0",
    "react-native-modal": "^13.0.1",
    "react-native-particles": "^0.0.8",
    "react-native-progress": "^5.0.1",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "4.10.1",
    "react-native-screens": "3.31.1",
    "react-native-svg": "15.2.0",
    "react-native-web": "^0.19.12",
    "react-native-webview": "13.8.6",
    "react-redux": "^9.1.2",
    "redux": "^5.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.24.0"
  },
  "private": true

App.js核心代码

export default function App(props) {

  const [isReady, setIsReady] = React.useState(false);
  const [publishableKey, setPublishableKey] = React.useState(null);

  const LoadFonts = async () => {
    await useFonts();
  };
 
  React.useEffect(() => {
    try{
      LoadFonts().then(() => {
          GetPublishableKey().then(res => {
            if (res.data && res.data.publishableKey){
                setPublishableKey(res.data.publishableKey)
                setIsReady(true)
            }
          })
          .catch(err => console.log(err))
          
      })
    }
    catch(err){
      setIsReady(true)
    }
  }, [])

  React.useEffect(() => {
    if (isReady) {
      SplashScreen.hideAsync();
    }
  }, [isReady]);

  if (!isReady) {
    return null;
  }

  // Define your HTTP link including the headers
  const httpLink = new HttpLink({
    uri: ' my GraphQL API endpoint',
    headers: {
       // here are my headers
    },
  });

  const client = new ApolloClient({
    link: from([httpLink]),
    cache: new InMemoryCache(),
  });

  return (
    <ApolloProvider client={client}>
      <Provider store={store}>
        <StripeProvider publishableKey={publishableKey}>
          <Connection />
        </StripeProvider>
      </Provider>
    </ApolloProvider>
  );
  
};

已尝试的排查步骤

  • 执行npx expo-doctor@latest,输出结果:Didn't find any issues with the project!
  • 删除node_modules后重新执行npm install,问题未解决

请问是否有人知道生产环境中导致代码异常的依赖或代码部分?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.22 16:47:33