Skip to content

Building for the Mac App Store

Addy edited this page Apr 24, 2017 · 9 revisions

Background

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.

QtWebEngine and QtWebEngineProcess

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.

Qt 5.8

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.

Qt 5.6.2

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.

Build Process

  1. Run macdeployqt using the following command line:

macdeployqt Owl.app -appstore-compliant -qmldir=<path to QML source>

  1. 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.

  2. 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.

  1. Tweak pInfo.list in the QtWebEngineProcess.app bundle. The key CFBundleIdentifier by default is set to com.qt-project.Qt.QtWebEngineProcess but since this is an executable it needs to match the same CFBundleIdentifier as the app, in this case com.owclient.full.

  2. Sign QtWebEngineProcess.app with the same command line as above.

  3. 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.

Clone this wiki locally