1

I'm working on my project using React native. When I do the project in debug mode, the app works well on both simulator and real device.

However, it doesn't work in release mode (I change the release mode in Xcode edit scheme), both simulator and real device. The odd thing is that it doesnt show any errors at all. It stucks on the native launching screen (Not the splash screen). As far as I know, it does not even run the code inside index.js file.

Has anyone experienced this before?

Looking forward to having your answers.

Here's my package.json file

{
  "name": "PodRecycling",
  "version": "1.0",
  "private": true,
  "scripts": {
    "8081": "adb reverse tcp:8081 tcp:8081 && yarn start",
    "splash": "yarn react-native generate-bootsplash splash/ic_koi_fish.png \\--background-color=FFFFFF \\ --logo-width=300 \\--assets-path=assets \\--flavor=main",
    "clean-android": "cd android && ./gradlew clean && cd ..",
    "clean-ios": "cd ios && xcodebuild clean && cd ..",
    "android": "yarn clean-android && npx react-native run-android ",
    "ios": "yarn clean-ios && npx react-native run-ios",
    "android-release": "clean-android && npx react-native run-android --variant=release",
    "start": "npx react-native start --reset-cache",
    "format": "prettier --write **/*.{ts,tsx,js,json,md}",
    "check-code": "prettier --check **/*.{ts,tsx,js,json,md}",
    "test": "jest",
    "li": "dot_clean -n . && node generateAssetResource.ts",
    "lint": "eslint index.js src --fix --ext .js,.ts,.tsx",
    "postinstall": "patch-package",
    "pod": "cd ios && pod install && cd ..",
    "reverse": "adb reverse tcp:9090 tcp:9090; adb reverse tcp:19001 tcp:19001;",
    "cp_all": "yarn cpi && yarn cpa",
    "rlink": "npx react-native link",
    "assembleRelease": "cd android && ./gradlew clean && ./gradlew assembleRelease && cd .."
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.36",
    "@fortawesome/free-solid-svg-icons": "^5.15.4",
    "@fortawesome/pro-light-svg-icons": "^5.15.4",
    "@fortawesome/pro-regular-svg-icons": "^5.15.4",
    "@fortawesome/pro-solid-svg-icons": "^5.15.4",
    "@fortawesome/react-native-fontawesome": "^0.2.7",
    "@react-native-community/blur": "^3.6.0",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/netinfo": "^5.9.7",
    "@react-native-community/push-notification-ios": "^1.10.1",
    "@react-native-community/toolbar-android": "^0.2.1",
    "@react-native-firebase/app": "^12.9.2",
    "@react-native-firebase/auth": "^12.9.2",
    "@react-native-firebase/crashlytics": "^12.9.2",
    "@react-native-firebase/dynamic-links": "^12.9.2",
    "@react-native-firebase/firestore": "^12.9.2",
    "@react-native-firebase/messaging": "^12.9.2",
    "@react-navigation/bottom-tabs": "^5.11.8",
    "@react-navigation/core": "^5.12.1",
    "@react-navigation/native": "^5.9.4",
    "@react-navigation/stack": "^5.14.5",
    "@reduxjs/toolkit": "^1.5.0",
    "axios": "^0.19.0",
    "deprecated-react-native-listview": "^0.0.6",
    "firebase-admin": "^10.0.0",
    "formik": "^2.2.9",
    "lodash.debounce": "^4.0.8",
    "moment": "^2.29.1",
    "native-base": "^2.15.2",
    "npm": "^6.14.6",
    "react": "17.0.1",
    "react-fast-compare": "^3.2.0",
    "react-hook-form": "^7.7.0",
    "react-native": "0.64.2",
    "react-native-actionsheet": "^2.4.2",
    "react-native-bootsplash": "^3.2.3",
    "react-native-camera": "^4.2.1",
    "react-native-camera-hooks": "^0.5.2",
    "react-native-elements": "^1.2.7",
    "react-native-fast-image": "^8.1.5",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-i18n": "^2.0.15",
    "react-native-image-crop-picker": "^0.36.0",
    "react-native-image-picker": "^2.3.0",
    "react-native-image-resizer": "^1.2.3",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-indicators": "^0.17.0",
    "react-native-keyboard-manager": "^6.5.4-1",
    "react-native-modal": "^11.5.6",
    "react-native-onesignal": "^3.4.2",
    "react-native-permissions": "^2.2.2",
    "react-native-progress": "^4.1.2",
    "react-native-push-notification": "^8.1.1",
    "react-native-qrcode-scanner": "^1.5.4",
    "react-native-reanimated": "^2.0.0-rc.3",
    "react-native-root-toast": "^3.2.1",
    "react-native-safe-area-context": "^3.1.1",
    "react-native-screens": "^3.3.0",
    "react-native-sensitive-info": "^6.0.0-alpha.9",
    "react-native-slider": "^0.11.0",
    "react-native-svg": "^12.1.1",
    "react-native-svg-transformer": "^0.14.3",
    "react-native-vector-icons": "^6.6.0",
    "react-native-webview": "^10.9.1",
    "react-redux": "^7.1.1",
    "reactotron-react-native": "5.0.0",
    "reactotron-redux": "^3.1.2",
    "reactotron-redux-saga": "^4.2.2",
    "redux": "^4.0.4",
    "redux-devtools-extension": "^2.13.8",
    "redux-saga": "^1.1.1",
    "redux-thunk": "^2.3.0",
    "whatwg-url": "^11.0.0",
    "yup": "^0.32.9"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/jest": "^26.0.20",
    "@types/react-native": "^0.63.51",
    "@types/react-redux": "^7.1.16",
    "@types/react-test-renderer": "^16.9.2",
    "@types/redux-logger": "^3.0.8",
    "@types/whatwg-url": "^8.2.1",
    "@typescript-eslint/eslint-plugin": "^4.18.0",
    "@typescript-eslint/parser": "^4.26.1",
    "babel-jest": "^26.6.3",
    "babel-plugin-module-resolver": "^4.1.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "eslint": "^7.14.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-import-resolver-alias": "^1.1.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-prettier": "^3.4.0",
    "hjson": "^3.2.2",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.64.0",
    "patch-package": "^6.2.2",
    "postinstall-postinstall": "^2.1.0",
    "prettier": "^2.3.1",
    "prettier-eslint": "^12.0.0",
    "prettier-eslint-cli": "^5.0.1",
    "react-test-renderer": "17.0.2",
    "tslint-config-prettier": "^1.18.0",
    "typescript": "^4.2.3"
  },
  "jest": {
    "preset": "react-native",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}

I'm using Xcode 13.2.1, macos 11.6.2 (BigSur). Tested app on ios 15.0 and 13.0

jackieTruong123
  • 251
  • 1
  • 3
  • 7

0 Answers0