Expo SDK 45升48后iOS生产环境React Native Stack Navigation崩溃
问题概述
- SDK版本:48
- 受影响平台:iOS(仅
--no-dev生产模式下出现,Android无异常) - 关联技术:React Native Stack Navigation
将Expo应用从SDK 45升级至48后,Firebase相关问题已解决,但在--no-dev模式下运行iOS应用时,启动页结束后立即崩溃。经排查,问题由React Native Stack Navigation引发,移除该导航组件后崩溃现象消失。
已完成的配置/排查步骤
- 已在
app.js顶部导入import 'react-native-gesture-handler'; app.js的根组件已正确包裹在Navigation Container中
项目依赖配置(package.json)
{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@bothrs/expo-mixpanel-analytics": "^2.0.3", "@expo/metro-config": "^0.7.1", "@expo/vector-icons": "^13.0.0", "@gorhom/bottom-sheet": "^4.4.5", "@react-native-async-storage/async-storage": "1.17.11", "@react-native-community/datetimepicker": "6.7.3", "@react-native-community/masked-view": "^0.1.11", "@react-native-community/netinfo": "9.3.7", "@react-native-community/slider": "^4.4.2", "@react-native-masked-view/masked-view": "0.2.8", "@react-navigation/bottom-tabs": "^6.5.7", "@react-navigation/material-top-tabs": "^6.6.2", "@react-navigation/native": "^6.1.6", "@react-navigation/native-stack": "^6.9.12", "@react-navigation/stack": "^6.3.16", "@reduxjs/toolkit": "^1.9.3", "@stripe/stripe-react-native": "0.23.3", "axios": "^1.3.4", "crypto-js": "^4.1.1", "deprecated-react-native-prop-types": "^4.0.0", "expo": "^48.0.11", "expo-application": "^5.1.1", "expo-barcode-scanner": "^12.3.2", "expo-blur": "~12.2.2", "expo-camera": "^13.2.1", "expo-constants": "^14.2.1", "expo-facebook": "^12.2.0", "expo-firebase-core": "^6.0.0", "expo-font": "^11.1.1", "expo-haptics": "^12.2.1", "expo-image-picker": "^14.1.1", "expo-linear-gradient": "^12.1.2", "expo-linking": "^4.0.1", "expo-location": "^15.1.1", "expo-notifications": "^0.18.1", "expo-permissions": "^14.1.1", "expo-splash-screen": "^0.18.1", "expo-status-bar": "^1.4.4", "expo-task-manager": "^11.1.1", "expo-updates": "^0.16.3", "firebase": "9.10.0", "geofire": "^6.0.0", "lodash": "^4.17.21", "lottie-ios": "^4.1.3", "lottie-react-native": "5.1.4", "moment": "^2.29.4", "radio-buttons-react-native": "^1.0.4", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.71.6", "react-native-accordion-list-view": "^2.0.1", "react-native-circular-progress": "^1.3.8", "react-native-dotenv": "^3.4.8", "react-native-gesture-handler": "^2.9.0", "react-native-maps": "1.3.2", "react-native-modal-dropdown": "^1.0.2", "react-native-pager-view": "6.1.2", "react-native-paper": "^5.4.1", "react-native-progress": "^5.0.0", "react-native-ratings": "^8.1.0", "react-native-reanimated": "~2.14.4", "react-native-safe-area-context": "4.5.0", "react-native-screens": "~3.20.0", "react-native-slider": "^0.11.0", "react-native-snap-carousel": "^3.9.1", "react-native-svg": "13.4.0", "react-native-svg-circular-progress": "^1.0.4", "react-native-swipe-list-view": "^3.2.9", "react-native-swiper": "^1.6.0", "react-native-tab-view": "^3.5.1", "react-native-text-ticker": "^1.14.0", "react-native-toast-notifications": "^3.3.1", "react-native-tracking-transparency": "^0.1.2", "react-native-web": "^0.18.12", "react-redux": "^8.0.5", "reanimated-bottom-sheet": "^1.0.0-alpha.22", "redux": "^4.2.1", "rn-range-slider": "^2.2.2" }, "devDependencies": { "@babel/core": "^7.20.0" }, "private": true }
已查阅SDK 48变更日志并尝试多种方法,均未解决此问题,寻求可行的解决方案。
内容的提问来源于stack exchange,提问作者ahmad asghar
相关产品推荐
相关产品推荐

