I’m creating a Flatpak app for the Librem 5. I might want to distribute it to Flathub. In order to show a summary, Git repo and other information, I’ve added an AppData XML file to my build that looks something like this:
com.example.gnome.App.metainfo.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.example.gnome.App</id>
<name>My App</name>
<summary>A summary</summary>
<description>
<p>A description</p>
</description>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<url type="vcs-browser">https://example.com/vcs/my-app.git</url>
<launchable type="desktop-id">com.example.gnome.App.desktop</launchable>
<content_rating type="oars-1.1" />
<!-- ... etcetera ... -->
meson.build
metainfo_file = i18n.merge_file(
input: 'com.example.gnome.App.metainfo.xml.in',
output: 'com.example.gnome.App.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)
appstream_util = find_program('appstream-util', required: true)
if appstream_util.found()
test('Validate appstream file',
appstream_util,
args: ['validate', metainfo_file],
verbose: true)
endif
I tried both appdata.xml
and metainfo.xml
(the latter is now recommended, apparently).
It validates when I run appstream-util validate
against it. Then, when I use Gnome Builder (version 43.5) and create a .flatpak
, I double click to open it in PureOS store. However, none of the metadata, including name and summary, shows. In fact, everything looks pretty empty. It says it’s a proprietary app, no screenshots are available, no age rating, etc.
What am I doing wrong? Is the AppData not in the generated .flatpak
? I would like to be able to test this locally before pushing to Flathub.