For anyone reading this in 2025, the real answer is adjusting your Info.plist with `NSAppTransportSecurity` as described here. You can read and see the additional option for NSAllowsLocalNetworking.