IOS Whitelisting

Thread is closed for posting
3 posts, 0 answers
  1. Ken
    Ken avatar
    6 posts
    Member since:
    Sep 2013

    Posted 23 Mar 2017 Link to this post

    I have recently needed to update an app that uses .ajax to call a webservice as in the example below.

    This was working perfectly when using cordova pre version 4 but this version is no longer available as a build option

    I'm assuming this is a "whitelist" issue but am struggling to find where and how I define this address

    Can anyone give any guidance on what needs updating?

    Many Thanks



            url: "",
            data: "{'db':'omega','Supplier':'Omega Signs'}",
           contentType: "application/json; charset=utf-8",
            dataType: "json",
            async: true,
            crossDomain: true,
            type: "POST",
            async: false,
            success: function (json) {
             jsonArray = $.parseJSON(json.d);
             for(i=0; i < jsonArray.length; i++)
                 project = jsonArray[i].installation;
                 var content = '<option value="' + project +'">' + project + '</option>';
            error: function (data) {
                alert("Error loading Projects " + data.responseText);

  2. Ken
    Ken avatar
    6 posts
    Member since:
    Sep 2013

    Posted 28 Mar 2017 Link to this post

    Just a quick update in case anyone else has these issues I was able to bypass the security issue by adding the keys below to the file.

        <key>NSAllowsArbitraryLoads</key> <true/>


    Not the best from a security point of view but at least we are up and running again.



  3. Martin
    Martin avatar
    104 posts

    Posted 28 Mar 2017 Link to this post

    Hi Ken,

    I see that you have already found a solution. Indeed iOS have introduced with iOS 9 App Transport Security with which if the application attempts to connect to make HTTP request (instead of HTTPS), the connection will fail.

    One way to solve this, as you mentioned, is to disable the App Transport Security by adding the following to your project info.plist

    You may also Configure App Transport Security exceptions as shown in this article.
    Telerik by Progress

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top