How to disable app transport security for nativescript app in ios sim

112 Views Asked by At

I'm trying to troubleshoot some unrelated issues, and I want to make requests to a non-SSL localhost server from my nativescript app running in the iOS sim.

I have updated my info.plist which is located at app/App_Resources/iOS/info.plist and included this at the bottom:

<key>App Transport Security Settings</key>
<dict>
    <key>Allow Arbitrary Loads</key>
    <true/>
</dict>

enter image description here

However, when the request is made to http://localhost:3000 I still get

TypeError: Network request failed: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

I can't find any additional instructions for disabling ATS, but I must have missed something?

My simulator is using iOS 12.1

0

There are 0 best solutions below