Does App Store accept Qt app linked with QT Library LGPLv3

Yes, it's possible.

You can use this Qt app template:

https://marketplace.qt.io/products/qt-lgpl-app-template

On IOS it's impossible to relink the App, so it's LGPL V3.0 incompatible (user can't replace Qt libraries)

But this template generates a redistributable .zip Qt project on every rebuild.

Their entire private project is distributed in a compiled .a library, so a user can open project in Qt Creator, rebuild their application and load it on their ipad / iphone, and your source code stays protected

Note: If you are using the qtquick compiler, you must relink it to the same version of Qt.

This .zip file can be uploaded to your own URL or you can add it to your software resources.

You can use the same template in an Android app, a static Windows app, etc.

It's the same as @psyched says, but 100% automatically.


App Store does not care which license you use. It is the users of your application and the Library authors who care. The main point of the LGPLv3 license is that the end users must have the possibility to replace the library with their own modified version. This is very important to understand, dynamic / static / everything else is just distracting.

Let's move to Qt. It is available with LGPLv3 license on major Desktop (Windows, OSX, Linux) and mobile (iOS, Android) operating systems. Suppose you develop an application and want to keep your source code closed. On the Desktop you can link dynamically to Qt libraries. When the end users install your application, they can replace Qt libraries in the following way:

  1. Compile their own version of Qt libraries
  2. Navigate the the location where the application is installed
  3. Replace original Qt libraies that were shipped with your applicatoin with their own modified versions

Looks easy, right? The main goal of LGPLv3 is achieved. The user can replace libraries.

Moving to the mobile platforms, starting with Android. Even though you link dynamically to the Qt libraries, we now have a small problem. The user can not navigate to C:/Program Files/YourApp and replace Qt libraries, because it's Android. Rooting is not an option, since it doesn't work on every device (and might not be legal). Remember, the main goal of LGPLv3 is to give the users ability to replace the library and run the modified version of your application on their device.

Solution? Provide .apk file to every user who installed your application with detailed instructions on how to:

  1. Unpack your .apk file
  2. Replace Qt libraries
  3. Zipalign / pack / signtool to a new .apk
  4. Install .apk with modified Qt libraries

Let's talk about iOS. Many say it is not possible to use LGPLv3 with iOS because of static linking. Wrong. Again, you just need to give the end user the possibility to replace Qt libraries. How? Provide your object files for the end user to relink. Or even better, put all your application code and resources in a separate Qt Quick plugin which will compile in a static library archive (technically just all object files concatenated together) for iOS. Then for every user who installed your application you have to provide instructions on how to replace Qt libraries:

  1. Download project files and object files from your website
  2. Download XCode and developer tools from Apple website
  3. Replace Qt libraries
  4. Deploy application to your device

Before this was not possible because in order to deploy on the device the user had to enroll Apple Developer Program. But this is not the case any more. You can launch your app on a device using a free Apple ID account

The end user rights are protected. They can replace Qt libraries. Just make sure you do required steps:

  1. Mention in your application that you use Qt libraries and also mention you use them under LGPLv3 license. Provide a link to LGPLv3 lincese.
  2. Make sure your setup of replacing Qt libraries work. Set up a clean virtual machine and do everything step by step. Document it for the end users.
  3. When the users who downloaded your application want to replace Qt libraries, provide them everything so they can do it.

Actually I don't think anyone would care. But you have to be ready just in case. Do not scream you use Qt LGPLv3 on Qt forums, but make sure you have it visible somewhere down in your application's "About" screen. Qt company does not have resources to scan every application from the App Store if it uses Qt or not. Neither they will touch you if you are a small-near-zero-profit. They have more important things to do.

It is very dissapointing however to see absolutely no help from people who work in Qt on the LGPL subject. Most likely all developers were instructed to answer "IANAL, please contact our legal department". The legal department will tell you - buy our commercial license, it's the only option. On the Qt website you can find Obligations of the LGPL. I am not surprised, there is no word about static linking and providing object files for re-link on this page. Qt company simply prefers not to tell anyone it is possible.

From my point of view LGPL was a huge step which enabled a lot of application to use Qt without disclosing their source code bringing huge popularity to Qt. Not to mention Nokia was the one who sponsored Qt on Mobile first (Symbian and then MeeGo).

Also thinking about MeeGo and Blackberry, there was no problem with developing closed source mobile apps that use Qt and publishing them in respective app stores. No commercial license needed.

Update: This has been done before. LGPL is possible with static linking and App Store. https://news.ycombinator.com/item?id=4302517

In case the question gets closed as off-topic, I copied the answer here https://opensource.stackexchange.com/questions/6463/in-2018-if-i-use-c-qt-5-10-0-to-build-a-closed-source-application-requires-ope/6495#6495

Tags:

Ios

Licensing

Qt