Mac Deployment Issue

601
3
10-07-2019 10:20 AM
SelimOzel
New Contributor III

I am trying to deploy a default ArcGIS QT Quick project into a macOS Mojave. The ArcGISQTQuick.app runs fine on my development Mac from the build folder.  On the target Mac, the app runs for a split second and exits.

I went through the Mac logs in the console applications and came across the following errors.

ArcGISQTQuick: QQmlApplicationEngine failed to load component

ArcGISQTQuick: qrc:/qml/main.qml:16 module "Esri.ArcGISRuntime" is not installed

Following .pri files are added to my ArcGISRuntime.pri.

!include($$priLocation/sdk/ideintegration/arcgis_runtime_qml.pri) {
  message("Error. Cannot locate ArcGIS Runtime PRI file")
}
!include($$priLocation/sdk/ideintegration/esri_runtime_qt.pri) {
  message("Error. Cannot locate ArcGIS Runtime PRI file")
}

I thought addition of those lines would have handled the .qml import paths. Is there anything else I should be doing? It seems that .qml files for Esri are not being linked/imported correctly to the deployment folder of the app.

As for the kit, I use Desktop QT 5.12.2 clang 64bit with release option.

Best,
Selim Ozel

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

Hi Selim-

If you open your app bundle (right click and select to show content), do you see an "Esri/ArcGISRuntime/" folder? Open up one of the sample viewers and compare it.

If memory serves me correct, Qt's macdeployqt tool didn't copy third party plugins into your app bundle, even if you specify the `-qmldir` argument. As a workaround, we would just copy the files into the app bundle manually.

For example, something along the lines of the following should get you on the right track:

$HOME/Qt5.12.0/5.12.0/clang_64/bin/macdeployqt ArcGISQt_QMLSamples.app -appstore-compliant -executable=ArcGISQt_QMLSamples.app/Contents/MacOS/ArcGISQt_QMLSamples -qmldir=../../../qt/sdk/samples
cp -p libEsriCommonQt.dylib ArcGISQt_QMLSamples.app/Contents/Frameworks/
cp -p libruntimecore.dylib ArcGISQt_QMLSamples.app/Contents/Frameworks/
cp -p ${SRC_DIR}/ArcGISRuntimePlugin.qmltypes ArcGISQt_QMLSamples.app/Contents/Resources/qml/Esri/ArcGISRuntime/
cp -p ${SRC_DIR}/libArcGISRuntimePlugin.dylib ArcGISQt_QMLSamples.app/Contents/Resources/qml/Esri/ArcGISRuntime/
cp -p ${SRC_DIR}/qmldir ArcGISQt_QMLSamples.app/Contents/Resources/qml/Esri/ArcGISRuntime/‍‍‍‍‍‍
SelimOzel
New Contributor III

I am trying this right now. Thanks a lot Lucas!

Best,
S

0 Kudos
SelimOzel
New Contributor III

Thanks once again! Finally figured out how to deploy looking at sample deployment options. They have been very helpful both for Mac and for Windows so far.

Best,

S

0 Kudos