My react-native app is not able to connect to the backend on iOS 15 devices only. Devices with iOS less than 15 and android devices are working fine.
I am using http connection with a static IP address.
I cannot switch to https now, neither can I use a domain name instead of an IP address. And I also cannot add the static IP to the exception domains since that is not accepted.
I have the following code in my Info.plist 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 domain name or switching to HTTPS?