Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploy QML webview application to Mac OS App Store.
Forum Updated to NodeBB v4.3 + New Features

Deploy QML webview application to Mac OS App Store.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nando
    wrote on last edited by Nando
    #1

    Hi,
    i have an application which is mainly written in C++ with QWidgets and uses QtWebEngine.
    Because of the QtWebEngine restrictions for the Mac OS App Store i am thinking of replacing the QtWebEngine related code by a QML Widget with webview.
    Is webview allowed for the App Store, or are there any private and forbidden API calls internally?

    Or maybe there is another way to just display web content inside my application and get it accepted by the Mac OS App Store?

    Greetings
    Nando

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      This is exactly what Qt WebView was made for. On iOS, it uses UIKit, which is public API. I therefore don't see why an app using Qt WebView shouldn't be accepted by the Apple Store.

      Director R&D, The Qt Company

      N 1 Reply Last reply
      2
      • kkoehneK kkoehne

        This is exactly what Qt WebView was made for. On iOS, it uses UIKit, which is public API. I therefore don't see why an app using Qt WebView shouldn't be accepted by the Apple Store.

        N Offline
        N Offline
        Nando
        wrote on last edited by
        #3

        @kkoehne Hi and thank you.
        I need it for the Mac OS App Store not for the iOS app store. Does it also work on the Mac OS App Store?

        1 Reply Last reply
        0
        • kkoehneK Offline
          kkoehneK Offline
          kkoehne
          Moderators
          wrote on last edited by
          #4

          I see. On macOS, Qt WebEngine indeed uses private API that the App Store might reject. We had maintained a flag to disable this use in earlier versions (use appstore_compliant_code in 5.6), but we had to drop it AFAIK in 5.10 again because it was not maintainable.

          You can force Qt WebView to use the native backend also on macOS; set QT_WEBVIEW_PLUGIN=native in the environment. Anyhow, there are known shortcomings for this on macOS, so your mileage might vary.

          Director R&D, The Qt Company

          N 2 Replies Last reply
          2
          • kkoehneK kkoehne

            I see. On macOS, Qt WebEngine indeed uses private API that the App Store might reject. We had maintained a flag to disable this use in earlier versions (use appstore_compliant_code in 5.6), but we had to drop it AFAIK in 5.10 again because it was not maintainable.

            You can force Qt WebView to use the native backend also on macOS; set QT_WEBVIEW_PLUGIN=native in the environment. Anyhow, there are known shortcomings for this on macOS, so your mileage might vary.

            N Offline
            N Offline
            Nando
            wrote on last edited by Nando
            #5

            @kkoehne said in Deploy QML webview application to Mac OS App Store.:

            Anyhow, there are known shortcomings for this on macOS, so your mileage might vary

            Do you mean i need to set QT_WEBVIEW_PLUGIN=native
            when compiling my application (in qtcreator build settings -> Build environment) ?

            I tried it but then when running macdeployqt still get this:

            Running macdeployqt
            WARNING: Plugin "libqtwebview_webengine.dylib" uses QtWebEngine and is not Mac App store compliant.
            WARNING: Skip plugin "libqtwebview_webengine.dylib"
            

            Where and how do i need to set QT_WEBVIEW_PLUGIN=native ?
            Thank you very much for your support.

            1 Reply Last reply
            0
            • kkoehneK kkoehne

              I see. On macOS, Qt WebEngine indeed uses private API that the App Store might reject. We had maintained a flag to disable this use in earlier versions (use appstore_compliant_code in 5.6), but we had to drop it AFAIK in 5.10 again because it was not maintainable.

              You can force Qt WebView to use the native backend also on macOS; set QT_WEBVIEW_PLUGIN=native in the environment. Anyhow, there are known shortcomings for this on macOS, so your mileage might vary.

              N Offline
              N Offline
              Nando
              wrote on last edited by
              #6

              @kkoehne said in Deploy QML webview application to Mac OS App Store.:

              I see. On macOS, Qt WebEngine indeed uses private API that the App Store might reject. We had maintained a flag to disable this use in earlier versions (use appstore_compliant_code in 5.6), but we had to drop it AFAIK in 5.10 again because it was not maintainable.

              You can force Qt WebView to use the native backend also on macOS; set QT_WEBVIEW_PLUGIN=native in the environment. Anyhow, there are known shortcomings for this on macOS, so your mileage might vary.

              Hi,
              i now compiled webview with QT_WEBVIEW_PLUGIN=native
              and then rebuilt my application.
              I see this log output when starting my application:

              Setting QT_MAC_WANTS_LAYER=1 and QSG_RENDER_LOOP=basic
              

              The webview qml is loaded but nothing is displayed. I Just see an emtpy rectangle without web stuff like before.

              So now it doesn't also when starting directly after building from QtCreator without macdeployqt stuff...

              Maybe you have an idea @kkoehne ?

              1 Reply Last reply
              0
              • kkoehneK Offline
                kkoehneK Offline
                kkoehne
                Moderators
                wrote on last edited by
                #7

                Sorry for not coming back to you earlier ...

                @Nando said in Deploy QML webview application to Mac OS App Store.:

                Where and how do i need to set QT_WEBVIEW_PLUGIN=native ?

                It's a runtime environment variable. That is, you have to set it before launching your application. If you want to do it programmatically you can add a qputenv() call early on in your main.cpp (preferably before Q[Gui|Core]Application is instantiated).

                I see this log output when starting my application:

                Setting QT_MAC_WANTS_LAYER=1 and QSG_RENDER_LOOP=basic

                This is normal output on macOS, AFAIK.

                Director R&D, The Qt Company

                1 Reply Last reply
                2

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved