React Native App Works on Debug Mode, But Not Works Release Mode on Ios

React Native release version built successfully but does not work like debug

maybe its because you are not using a secure api.
try adding this in AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" /> <!-- < add this line > -->

<application
...
android:usesCleartextTraffic="true" <!-- < add this line > -->
/>
...
</application>

In Debug Mode, API Request works. Release Mode, returns null

This is my step by step journey with this issue.

  1. Factory Reset

    • I ended up having to do a factory reset
    • Also had to upgrade again to the latest Catalina/Xcode.
  2. Started Project Fresh

    • I saved the src file, package.json, the app icons, and other specifics
    • Built it with a new project with react-native init AwesomeNativeBase
  3. Changed Deployment Target

    • I searched all IOS_DEPLOYMENT_TARGET = {version number here} in the file program and changed it to 11.0.
    • Kicked it off with a pod install
  4. Update React and React-Native

    • Its FUNDAMENTAL you have the latest version of React and React-Native.
    • Make sure to check their websites

Its not the cleanest solution but its what worked for me.



Related Topics



Leave a reply



Submit