Alert message in index.html wrt exported games

  • I get an error alert saying "Exported games do not work etc.,..." when trying to run the index.html inside cordova. Inside index.html I see the below code was newly added causing this. Removing this code removed the alert as well but runs fine inside Corodova...Is it expected to be removed like the way I did when running inside Cordova? OR am I doing something wrong?

    -------

    <script>

    // Issue a warning if trying to preview an exported project on disk.

    (function(){

    // Check for running exported on file protocol

    if (window.location.protocol.substr(0, 4) === "file")

    {

    alert("Exported games won't work until you upload them. (When running on the file:/// protocol, browsers block many features from working for security reasons.)");

    }

    })();

    </script>

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Which export option did you choose? That check should only be there if you choose 'Export HTML5 website'. If you are exporting for Cordova you should choose 'Export for PhoneGap', which doesn't have that check.

  • Thanks "Export for PhoneGap" works without issues for Cordova

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)