HtmlViewer issue on MacOS

  1. 2 weeks ago

    Jean-Luc A

    Sep 2 France, south of Paris

    Hi all,

    I coded some times ago (maybe 2 years) a project including a HtmlViever. It worked well on Mac OS and Windows.
    Today, I'm trying to update this project and I'am unable to get this HtmlViewer working on Mac OS. It's still working on Windows.

    Some information : Xojo 2018r4 or 2019r1, Mac OS X 10.13.6, Windows 10 Pro.
    I'm using http:// in the URL.
    With the same URL, in a simple project, HtmlViewer works on both Mac OS and Win.
    I tried different syntax:
    MyHtmlViewer.LoadUrl("http://MyUrl")

    you need https with recent macos
    and you need to allow app transport security : http://docs.xojo.com/UserGuide:App_Transport_Security

  2. Jean-Luc A

    Sep 2 France, south of Paris

    Sorry, send to quickly...

    So, I tried different syntax:
    MyHtmlViewer.LoadUrl("http://MyUrl")
    MyHtmlViewer.LoadUrl ("http://MyUrl")
    MyHtmlViewer.LoadUrl "http://MyUrl"

    Dim URL as String ' or As Text
    URL="http://MyUrl"
    MyHtmlViewer.LoadUrl URL

    All these syntaxes work in a simple project, none in my project.

    When trying to load the URL, all events are fired, but nothing is displayed.
    I don't even know where to start debugging...

    Many thanks for any help or idea.

    Jean-Luc

  3. Jean-Yves P

    Sep 2 Pre-Release Testers, Xojo Pro Answer Europe (France, Besançon)

    you need https with recent macos
    and you need to allow app transport security : http://docs.xojo.com/UserGuide:App_Transport_Security

  4. Jean-Luc A

    Sep 3 France, south of Paris

    Great!
    Very important and useful information, I had no idea about that.

    For other readers information, I just had some difficulties locating the Info.plist file. It's located in the .app package.
    After modifying it accordingly with Jean-Yves's reply, it works like a charm!

    Just another question: Is it possible to modify this Info.plist file directly from the app, or better, from a XojoScript?
    An example would be welcome.

    Thanks a lot, Jean-Yves.

  5. Jean-Yves P

    Sep 3 Pre-Release Testers, Xojo Pro Europe (France, Besançon)
    Edited 2 weeks ago

    just add the plist keys to a file and drop it in the xojo project.
    https://docs.xojo.com/UserGuide:Using_a_plist

  6. Jean-Luc A

    Sep 3 France, south of Paris

    So simple ...
    It works like a charm.
    Thank you very much, Jean-Yves.

or Sign Up to reply!