Error with Qt 6.4.3 and Esri Qt Maps SDK 200.1 on iOS

558
2
Jump to solution
08-23-2023 08:55 AM
Labels (2)
KCLewelling
New Contributor II

I work on an application that we are upgrading from Qt 5.15 and Esri Qt SDK 100.15 to Qt 6.4 and Esri SDK 200.1.  But I get an error when running the Qt 6.4/SDK 200.1 version for the iOS platform in Xcode:

ASSERT: "!parsed.isError()" in file /Users/qt/work/qt/qtbase/src/corelib/plugin/qpluginloader.cpp, line 451

I have tried creating a simple map project using the Esri Qt Quick QML app template, but I get the same error when I try running that for the iOS build, too.  I found this forum post from a few months ago:

windows installation trouble - Esri Community

Here are the suggestions from this post that I tried, but they did not fully solve my problem:

Add the following to main.cpp:

qputenv("QT_DEBUG_PLUGINS", "1");

#if defined(Q_OS_IOS)
#  if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
    extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility());
#  endif
#endif
#endif

With these changes in, I was able to run the simple map project against the iOS Simulator, but I am still getting errors when running my application for the iOS Simulator (within Qt Creator).   This is the error written to the console:

module “Esri.ArcGIS Extras” plugin “ArcGISExtrasPlugin” not found

My application DOES run with Esri SDK 200.2 and Qt 6.5.2, but there are styling issues with Qt 6.5 that make that platform combination not as desirable. 

Here is my configuration that I would like to get this working on:

  • Xcode 14.2
  • macOS Monterey 12.6.2
  • Qt 6.4.3
  • Device types: iOS and iOS Simulator
  • Build config: release
  • ArcGIS Maps SDK for Qt 200.1

Has anyone found a workaround for the qpluginloader error in Qt 6.4 + Esri SDK 200.1? 

Thanks,

Kelley

0 Kudos
1 Solution

Accepted Solutions
Tanner_Yould
Esri Contributor

Hi Kelley, thanks for reaching out! 

Unfortunately you're running into a known issue with 200.1, in that you cannot deploy the QML ArcGIS Plugin on iOS with Qt 6.3 or later.

However, I believe we came up with a workaround, and you have half of it there. Try updating your code block to this:

#if defined(Q_OS_IOS)
#  if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
    extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility());
    extern const QStaticPlugin qt_static_plugin_ArcGISExtrasPlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISExtrasPlugin_compatibility());
#  endif
#endif

This adds compatibility for the ArcGIS Extras plugin as well, which is necessary when deploying some aspects of the QML ArcGIS plugin.

Try this and let me know if it works for you, thanks! 

Tanner Yould
Samples Product Engineer
ArcGIS Maps SDK for Qt
Esri

View solution in original post

0 Kudos
2 Replies
Tanner_Yould
Esri Contributor

Hi Kelley, thanks for reaching out! 

Unfortunately you're running into a known issue with 200.1, in that you cannot deploy the QML ArcGIS Plugin on iOS with Qt 6.3 or later.

However, I believe we came up with a workaround, and you have half of it there. Try updating your code block to this:

#if defined(Q_OS_IOS)
#  if QT_VERSION >= QT_VERSION_CHECK(6, 3, 0)
    extern const QStaticPlugin qt_static_plugin_ArcGISRuntimePlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISRuntimePlugin_compatibility());
    extern const QStaticPlugin qt_static_plugin_ArcGISExtrasPlugin_compatibility();
    qRegisterStaticPluginFunction(qt_static_plugin_ArcGISExtrasPlugin_compatibility());
#  endif
#endif

This adds compatibility for the ArcGIS Extras plugin as well, which is necessary when deploying some aspects of the QML ArcGIS plugin.

Try this and let me know if it works for you, thanks! 

Tanner Yould
Samples Product Engineer
ArcGIS Maps SDK for Qt
Esri
0 Kudos
KCLewelling
New Contributor II

Tanner,

This workaround got me past the errors I was getting, and I can now deploy the app to my test iPad.  

Thank you!!

Kelley