0

I am sending an HTTP request with dummy username and password to test the my App.

On working with non-release variants i.e react-native run-android, I am capable of sending http requests to the server and receive a token, thus, logging in. However, this is not true when I try it on the release version of the apk react-native run-android --variant=release

Note: It allow works on ios after making

<key>NSAllowsArbitraryLoads</key>
        <true/>
Mohamed Daw
  • 71
  • 1
  • 6

1 Answers1

2

You must add the following code to AndroidManifest.xml file to allow http requests.

android:usesCleartextTraffic="true"

For more information look at this question

Mir Milad Hosseiny
  • 2,769
  • 15
  • 19