-
Notifications
You must be signed in to change notification settings - Fork 2
Building for the Mac App Store
For version 0.7.6, Owl was updated to use Qt 5.6.2. This document explains the build process we had to implement in order to have a successful build for the Mac App Store.
QtWebEngineProcess.app
is a helper app included in QtWebEngineCore.framework
and is required for rendering of pages that use QtWebEngine
. This poses a challenge when code signing the application for sandboxing, since QtWebEngineProcess.app
is an external process.
Originally we wanted to use Qt 5.8 for Owl's 0.7.6 release, however QtWebEngineProcess.app
failed to load when we would run Owl in sandbox mode. This meant that any control in Owl that uses QWebEngine
would not work. The Post Pane in Owl is an HTML generated page displayed in a QWebEngineView
, which meant that posts would not display at all when Owl was running sandboxed.
We were finally able to get QtWebEngineProcess.app
to run correctly when we downgraded to Qt 5.6.2. However there were still some hurdles we had to jump in order to get this to work.
- Run
macdeployqt
using the following command line:
macdeployqt Owl.app -appstore-compliant -qmldir=<path to QML source>
-
Recursively delete all *.dSYM files. The
macdeployqt
tool will copy the debug symbols into the deployable bundle, so our build process steps through the bundle and deletes them. -
Sign each Qt*.framework. We have a list that we maintain of the Qt frameworks included in the bundle. Our build process goes through each
Owl.app/Contents/Framework
and signs the frameworks as follows:
codesign --deep --force --sign '3rd Party Mac Developer Application' -i 'com.owlclient.full' --entitlements <path to entitlements file>
To generate the entitlements file, we simply used the Owl.entitlements
that we generated through Xcode.
-
Tweak
pInfo.list
in theQtWebEngineProcess.app
bundle. The keyCFBundleIdentifier
by default is set tocom.qt-project.Qt.QtWebEngineProcess
but since this is an executable it needs to match the sameCFBundleIdentifier
as the app, in this casecom.owclient.full
. -
Sign
QtWebEngineProcess.app
with the same command line as above. -
Sign the entire
Owl.app
bundle. This will overwrite several signatures but is required.
Finally our build script then uses productbuild
to build the .pkg file which then gets submitted to the App Store.