I’m playing around with Expo and React Native. I use fetch to get a resource from Node.js running on my machine. The protocol I use is http not https because I don’t have a verified certificate. When I run this in a browser it works, but when I run it on my iPhone (using Expo) it gives me TypeError: network request failed.
I know that I must have the key NSAllowsArbitraryLoads set to true in my Info.plist and so I have that. I’ve also tried inserting a key with my pc’s IP adress in the NSExceptionDomains dictionary with the NSExceptionAllowsInsecureHTTPLoads set to true, but without success.
The server includes the Access-Control-Allow-Origin header (value “*”) and I’ve searched the drive from my app’s directory down to see if perhaps there are more Info.plist files and I’m editing the wrong one, but that does not appear to be the case. I’ve switched off my firewall entirely (I’m on Windows 10). I upgraded my expo-cli package to the latest today.
Any suggestions what to look for?