Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Network requests failed with React Native Expo on iOS

$
0
0

There are questions that are related but none of them answered my question so I thought let's ask it myself with some details.

I am working with a React Native build with the Expo SDK. I am using a localhost GraphQL API but it seems that iOS prevents fetching data from http endpoints. According to sources and other related questions, you have to add stuff to your info.plist file in your iOS build.

But since I am using the Expo SDK I don't have my iOS build. According to the docs, you can add a infoPList object to your app.json. This answer suggests that as well.

So I added in my app.js the following but that didn't worked out:

"ios": {"supportsTablet": false,"infoPlist": {"NSAllowsArbitraryLoads": {"NSAllowsArbitraryLoads": true        }    }}

I am still getting the same "Network request failed" error. Does someone know the solution to this without ejecting?


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>