Quote:I would like to know what tools, books I need to learn in order to start developing apps for the PinePhone Pro ?
Hello @
ZX Spectrum,
There are four different frameworks you can use to develop mobile Linux apps:
- KDE's Kirigami Framework
- Gnome's libadwaita
- KDE's MAUI Kit
- Google's Flutter
Kirigami Framework
Kirigami is designed to enable you to develop app with convergent user interfaces, meaning you develop the GUI frontend once and your app automatically adjusts itself for mobile and desktop environments. Kirigami apps use QML for the frontend and C++ or, alternatively, Python for their backend.
Like all KDE software, Kirigami is built on top of the Qt 5 framework and will later transition to Qt 6. Qt development greatly focuses on embedded devices, making Qt the best performing framework for mobile Linux app development. Outside of KDE software, Kirigami is used by two third party apps:
Subsurface and
QPrompt. Disclaimer, I'm the developer behind QPrompt. I chose Kirigami and Qt for QPrompt precisely because a fast performing UI was an absolute requirement for my project.
Use the following resources to get started with Kirigami:
Some of those resources are meant for entry level developers. I leave them here for newcomers that come across this thread. I found them very useful.
Kirigami apps can run on Linux, Android, iOS, Windows, macOS, and other Unix systems. Nevertheless, Android support is minimal and iOS support is basically nonexistent.
KDevelop is a DE that tightly integrates with KDE libraries and frameworks such as Kirigami.
Libdwaita
If you like the simple and elegant designs of Gnome apps, libadwaita is a great option. Libadwaita is Gnome's new move towards convergent apps. It is the successor to the libhandy libraries, which were used to make regular Gnome apps work on mobile Linux environments. Libadwaita apps are built on top of the GTK 4 framework and are developed in C, and there are also bindings for other languages, such as Rust, JavaScript, and Python.
Many Gnome and Elementary OS apps are in the process of transitioning from GTK 3 to GTK 4 and from using libhandy to libadwaita. GTK 3 software is known to have terrible performance, even on hardware accelerated systems. This is why Posh, and mobile Gnome app will perform at a lower frame rate even on the PinePhone Pro. GTK 4 is much faster, nearing the performance of Qt apps on desktop. I have yet to see how effective this performance increase is for mobile applications.
Here are some resources to get started with libadwaita:
Libadwaita apps run on Linux, Windows, macOS, and other Unix systems.
Gnome Builder is a DE that tightly integrates with Gnome libraries and such as libawaita.
Maui Kit
Maui Kit is a UI kit developed by Nitrux as part of the KDE Project. It is built on top of Kirigami focused on building beautiful convergent applications. If offers more tools to create great UIs at the expense of slower startup times and slightly less performance. Maui Kit is not to be confused with Microsoft's MAUI Kit, which is a similar project that came after.
- Website https://mauikit.org/
- All of Kirigami's resources apply to Maui Kit as well
- I failed to find any documentation specific to Maui Kit. You'll probably have to study existing app's source code to develop with Maui.
Maui Kit apps can run anywhere where Kirigami apps run.
KDevelop is a DE that tightly integrates with KDE libraries and frameworks such as Maui Kit.
Flutter
Flutter is the GUI toolkit native to Fuchsia OS. It is a cross platform GUI framework designed for mobile apps, that has moved to enable development in the desktop as well. Apps developed in Flutter are written in the Dart programming language. Flutter's performance is comparable to Qt's, although it's in fact slower. Out of the aforementioned frameworks it is the one with least integration with mobile Linux environments. Nevertheless, Flutter apps that make use of a theme that simulates GTK 3 can feel native to a Linux environment. A Linux app developed with Flutter is
AppImage Pool.
Flutter apps can run on Linux, Android, iOS, Windows and macOS. Out of all the aforementioned frameworks, it is the best option for cross platform mobile apps, as it tightly integrates with both Android and iOS. For desktop apps that also work on the phone, you should use one of the aforementioned frameworks. Flutter is also your only option for commercial apps where access to advertisement resources is necessary. Nevertheless, as you probably know, ads in apps are not well received in the Linux community.
Here are some resources to get started with Flutter:
Flutter apps are native to mobile devices, and run on Android, iOS, Linux, Fuchsia, Windows, and macOS.
Quote:I prefer reading books over scavenging from badly written blogs and tutorials
Sorry. There are no books about most of these libraries. With the exception of Qt, GTK, and Kirigami, this is all pretty new. Qt's documentation is amazingly good, Flutter's seems great also. Most others help you understand the frameworks, but you'll have to study other people's open source code in order to make the most from them. This is especially true when it comes to porting your app from Linux to other platforms.
Distributing your app
The best and simplest way to make your app available on most mobile Linux distros is as a Flatpak package distributed through Flathub, because Flatpak support now comes by default in most distros, and Flathub compiles your program for arm64 as well as amd64 architectures.
https://github.com/flathub/flathub/wiki/App-Submission
Follow Gnome Software's guidelines for distribution to prepare your app for distribution, irregardless of the framework it was written in.
https://gitlab.gnome.org/GNOME/gnome-sof...e-metadata