React Native on iOS: Network Request Failed

In need of a positive encouragment?

Go to Positivity By Ray Ray and grow a positive mindset! ❤️

By default iOS isn’t supporting HTTP requests, only HTTPS requests are allowed.

But what if you have an API that only works with HTTP, you can easily change the setting’s to support HTTP requests.

When I first tried to do a request to an HTTP address it gave me the error “Network Request Failed”. I couldn’t get why.

But after some digging, I figured iOS was only supporting HTTPS.

To change this, open the “info.plist”. You can find this at ‘ios/ProjectName’.

Search for <key>NSAppTransportSecurity</key>. If it’s there already you only need to this code below it:


Now close your simulator and kill the running process (if you already started it). Run react-native run-ios again, and now your iOS app will support HTTP calls.

Hope this will help to fix your problem with React Native 🙂