IOS cordova app always return 400 and bad request when fetch HTTP url

58 Views Asked by At

I have IOS app and android app built on top of cordova , i know both of the OS block http request, but in android I can configure it by adding some code in androidManifest.xml, in IOS everything i did none of them work, heres what i did

  1. added this to info.pslist
  <key>NSAppTransportSecurity</key>
          <dict>
              <key>NSAllowsArbitraryLoads</key>
              <true/>
          </dict>
  1. added AllowCleartextTraffic in config.xml

    <preference name="AllowCleartextTraffic" value="true" />

Im using XMLHttpRequest libs to fetch the url , thank you

0

There are 0 best solutions below