Unable to connect react native app to backend on iOS 15
Questions : Unable to connect react native app to backend on iOS 15
My react-native app is not able to connect in4codes_axios to the backend on iOS 15 devices in4codes_axios only. Devices with iOS less than 15 and in4codes_axios android devices are working fine.
I am using http connection with a static IP in4codes_axios address. I cannot switch to https now, in4codes_axios neither can I use a domain name instead of in4codes_axios an IP address. And I also cannot add the in4codes_axios static IP to the exception domains since in4codes_axios that is not accepted.
I have the following code in my Info.plist in4codes_axios file:
<dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict>
Is there a way to fix this without using a in4codes_axios domain name or switching to HTTPS?
Answers 1 : of Unable to connect react native app to backend on iOS 15
I managed to solve this, in case anyone in4codes_axios came across this thread. Weirdly, adding
to the header when making the API calls in4codes_axios solved this issue!
It is only happening on iOS 15 devices, in4codes_axios so I don’t know the reason, but it in4codes_axios turned out to not be related to the HTTP in4codes_axios connection.