Detailed documentation on AppStudio compile process

3217
1
Jump to solution
11-22-2015 07:39 AM
JohnDye
Occasional Contributor III

I need to determine if native applications produced by AppStudio/QtCreator are compatible with my company's App-VPN solution, Mocana. I reached out to the vendor and they told me that applications produced using QtCreator are not certified. Which basically translates to "it might work, we haven't tested it".

What I'm looking for is detailed documentation regarding how AppStudio/QtCreator compiles the QML/JavaScript source into a native iOS and/or Android application, what gets produced and how that differs from what would be produced if the application were developed in Android Studio or XCode from the start.

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

John-

I will give you a brief overview of what is happening, but you should consult Qt documentation for further details pertaining to what exactly you need (http://qt.io). AppStudio/Runtime simply extend the Qt framework by creating some custom location related classes, so we won't maintain the kind of detailed documentation that it sounds like you need - The Qt Company should have this type of info. I found the following presentation that might help, but there are surely others out there - https://classes.soe.ucsc.edu/cmps160/Fall10/resources/qtexcerpt.pdf

Basically, Qt is a C++ framework that can be compiled across multiple platforms. The goal is to create one interface to program against, and that one interface will go into the different platforms and handle the differences between each. Android apps are typically developed in Java, so in order to talk with functionality implemented through Java, it must go through the Java Native Interface (JNI) and use the Android NDK. iOS apps are developed in Objective C (and Swift), and C++ can directly talk to Objective C. Qt creates a class, for example, a Qt Quick ComboBox, and the underlying code will go through the JNI and create an Android ComboBox (or the equivalent), and into Objective C, and create an iOS ComboBox (or the equivalent), etc for other platforms.

QML comes into the picture once the C++ class is developed. It is registered as a QML type, which means it can be declared in QML code. Macros in the C++ class expose properties and methods to be get/set/called from the QML side. QML is built on top of a JavaScript engine, which is where you get the JavaScript syntax from. However, the underlying classes that it is interacting with are actually written in C++, not JavaScript.

One thing to note is that QML itself is not actually compiled- the underlying C++ class is compiled, but QML uses Just-in-time compilation technique, which is why AppStudio's player can just load your projects without you needing to actually compile anything. More details about how this works can be found here - Qt Quick Compiler 3.0

This is by no means comprehensive, but hopefully this helps get you on the right track. It also might be worth contacting Qt to try and get some of the specific info you get, or you could try posting on their forums as well.

-Luke

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

John-

I will give you a brief overview of what is happening, but you should consult Qt documentation for further details pertaining to what exactly you need (http://qt.io). AppStudio/Runtime simply extend the Qt framework by creating some custom location related classes, so we won't maintain the kind of detailed documentation that it sounds like you need - The Qt Company should have this type of info. I found the following presentation that might help, but there are surely others out there - https://classes.soe.ucsc.edu/cmps160/Fall10/resources/qtexcerpt.pdf

Basically, Qt is a C++ framework that can be compiled across multiple platforms. The goal is to create one interface to program against, and that one interface will go into the different platforms and handle the differences between each. Android apps are typically developed in Java, so in order to talk with functionality implemented through Java, it must go through the Java Native Interface (JNI) and use the Android NDK. iOS apps are developed in Objective C (and Swift), and C++ can directly talk to Objective C. Qt creates a class, for example, a Qt Quick ComboBox, and the underlying code will go through the JNI and create an Android ComboBox (or the equivalent), and into Objective C, and create an iOS ComboBox (or the equivalent), etc for other platforms.

QML comes into the picture once the C++ class is developed. It is registered as a QML type, which means it can be declared in QML code. Macros in the C++ class expose properties and methods to be get/set/called from the QML side. QML is built on top of a JavaScript engine, which is where you get the JavaScript syntax from. However, the underlying classes that it is interacting with are actually written in C++, not JavaScript.

One thing to note is that QML itself is not actually compiled- the underlying C++ class is compiled, but QML uses Just-in-time compilation technique, which is why AppStudio's player can just load your projects without you needing to actually compile anything. More details about how this works can be found here - Qt Quick Compiler 3.0

This is by no means comprehensive, but hopefully this helps get you on the right track. It also might be worth contacting Qt to try and get some of the specific info you get, or you could try posting on their forums as well.

-Luke