title: AJAX post request working in browser, not on Phonegap App
body: <p>A simple AJAX request is failing when I test it using the Phonegap App on iOS10.</p>
  
  <p>Code is as follows (works perfectly in browser):</p>
  
  <pre><code>if($.trim(firstname).length &gt; 0 &amp; $.trim(email).length &gt; 0 &amp; $.trim(password).length &gt; 0) {
  
              console.log("input checked");
  
              $.support.cors = true;
              $.ajax({
                  type: "POST",
                  url: "http://my-server.com/signup.php",
                  data: dataString,
                  crossDomain: true,
                  cache: false,
  
                  beforeSend: function(data) {
                      console.log("connecting to server");
                  },
  
                  //display success/fail message - put something in data on server
                  success: function(data, textString, xhr) {
                      if(data == "success") {
                          localStorage.login = "true";
                          localStorage.email = email;
                          mainView.router.loadPage("swipe.html");
                      } else if(data == 'exist') {
                          myApp.alert("Account already exists", "Login Failed");
                      }
                  },
  
                  error: function(xhr, ajaxOptions, errorThrown) {
                      console.log("error msg: ");
                      console.log(xhr);
                      console.log(errorThrown);
                      myApp.alert("Unknown error, please try again", "Login Failed");
                  },
  
                  complete: function(data) {
                      if(data.readyState == "0") {
                          console.log("unsent");
                      } else if(data.readyState == "4") {
                          console.log("done");
                      }   
                  }
  
              });
          } return false;
      }
  </code></pre>
  
  <p>I have the config.xml file set up exactly as outlined in many previous answers: </p>
  
  <pre><code>&lt;plugin name="cordova-plugin-whitelist" /&gt;
  &lt;access origin="http://my-server.com" /&gt;
  
  etc...
  </code></pre>
  
  <p>Obviously disabling apple's App Transport Security is not going to be possible as I am not building the app, simply testing it on a Phonegap server and the Phonegap App.</p>
  
  <p>But is this possibly to do with ATS preventing ajax requests to other domains from the Phonegap App itself? As I suppose it would require Phonegap to allow access to all domains, which probably isn't allowed on the app store!</p>
  
  <p>That is my best guess as to what is happening. Any ideas or workarounds?</p>