Browser widget only displays content in IDE not on device

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
nicoloose
Posts: 99
Joined: Mon Sep 16, 2013 3:35 pm

Browser widget only displays content in IDE not on device

Post by nicoloose » Thu Apr 11, 2019 7:20 pm

I have a sample page with some css js and font folders in the root folder http://www.sprigandsprout.co.uk/appcontact/index.html

In my mobile app, I set the widget browser url to the url above and in the IDE, it displays as expected. When I save it as a stand alone and test it on my device, the contents do not show. Here is the index page:

Code: Select all

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Jumbotron Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <!-- <link href="jumbotron.css" rel="stylesheet"> -->
  </head>

  <body>

    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Project name</a>
        </div>
        <div class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" role="form">
            <div class="form-group">
              <input type="text" placeholder="Email" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" placeholder="Password" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">Sign in</button>
          </form>
        </div><!--/.navbar-collapse -->
      </div>
    </div>

    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
      <div class="container">
        <h1>Hello, world!</h1>
        <p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
        <p><a class="btn btn-primary btn-lg" role="button">Learn more &raquo;</a></p>
      </div>
    </div>

    <div class="container">
      <!-- Example row of columns -->
      <div class="row">
        <div class="col-md-4">
          <h2>Heading 1</h2>
          <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
          <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
        </div>
        <div class="col-md-4">
          <h2>Heading 2</h2>
          <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
          <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
       </div>
        <div class="col-md-4">
          <h2>Heading 3</h2>
          <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
          <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
        </div>
      </div>

      <hr>

      <footer>
        <p>&copy; Company 2014</p>
      </footer>
    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>
Perhaps my understanding is too limited and I am missing something glaringly obvious but if I load another of my own websites into the browser widget, it displays ok.

I have literally WASTED an entire day trying to figure this out. Please some help would be so welcome!

Klaus
Posts: 14192
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Browser widget only displays content in IDE not on device

Post by Klaus » Thu Apr 11, 2019 8:13 pm

Hi Nico,

I think in the "Standalone Application Settings" the automatism "Search for required inclusions when saving standalone application" does not work reliably! :(

Check "Select inclusions..." and on the "Inclusions" TAB select the browser widget manually and everything else you need. That should do the trick, at least worth a try.


Best

Klaus

nicoloose
Posts: 99
Joined: Mon Sep 16, 2013 3:35 pm

Re: Browser widget only displays content in IDE not on device

Post by nicoloose » Thu Apr 11, 2019 9:23 pm

Hi Klaus,

Thanks for the suggestion but my inclusions were all already manually selected. I have other parts of my app working where the browser works but I have included all the code in the card script including all css and js. This is obviously not a good solution but shows the browser does indeed work.... just not with referenced assets.

Regards
Nic

Klaus
Posts: 14192
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Browser widget only displays content in IDE not on device

Post by Klaus » Thu Apr 11, 2019 9:33 pm

OK, that was just a quick guess based on experience. :D

What "device'" are we talking about?
If you mean an iOS device, then you HAVE TO use httpS urls,
Apple does not allow surfing to "insecure" http urls anymore.

nicoloose
Posts: 99
Joined: Mon Sep 16, 2013 3:35 pm

Re: Browser widget only displays content in IDE not on device

Post by nicoloose » Fri Apr 26, 2019 11:27 am

Hi Klaus,

You were right, it was ios blocking non-https content. I have it working well now.

Post Reply