Metadata
Last updated
Last updated
Every app comes with two metadata files that we can generate using an online tool. Open AppStream Metainfo Creator and fill out the form with your app's info:
When you get the section titled "Launchables", make sure to select "Generate a .desktop file for me".
Don't worry about generating Meson snippets, as we'll cover that in the next section. After you select "Generate", you should have two resulting files that you can copy.
First is a MetaInfo file. This file contains all the information needed to list your app in App shop. It should look something like this:
In your project's root, create a new folder called "data", and save your MetaInfo to a new file called "hello-again.metainfo.xml".
Below are some of the most important fields for publishing in AppCenter, but there are even more optional fields that you can read about
For the purposes of this tutorial, screenshots are optional, but they are required for publishing in App Shop. Screenshots should only show your app on a transparent background and not contain any additional text or illustrations. You can use the caption
tag to provide translatable and accessible descriptions of your screenshots.
You can use the built-in Screenshot app on elementary OS with the "grab the current window" option or secondary-click on your app's title area and select "Take Screenshot" to get transparent window-only screenshots of your app
We use the Open Age Rating Service (OARS) standard to describe sensitive content that may be present in your app so that people using it can be informed and actively consent to seeing that content. OARS data is required and can be generated by taking a short survey:
You can also specify a brand color for your app by adding the branding
tag inside the component
tag. Colors must be in hexadecimal, starting with #
. The background will automatically be given a slight gradient in your app's banner.
Your app must have a release
tag for every version you wish to publish in AppCenter. Release notes show up in App shop and should be aimed at the people who use your app. Avoid technical language and developer-facing changes and focus more on what people can expect to see in this update.
Previous release
tags can remain in your MetaInfo file forever, and we encourage it; App shop may use them to show changes across multiple releases of your app
You can read more about the release tag here, including more features and formatting options.
This file contains all the information needed to display your app in the Applications Menu and in the Dock. The one generated from AppStream Metainfo Creator looks something like this:
Copy the contents of your Desktop Entry and save it to the data folder you created earlier. Name this new file "hello-again.desktop".
For more info about crafting .desktop files, check out this HIG entry.
Each time we add a new file or make a significant change it's a good idea to commit a new revision and push to GitHub. Keep in mind that this acts as a backup system as well; when we push our work to GitHub, we know it's safe and we can always revert to a known good revision if we mess up later.
Add all of these files to git
and commit a revision:
Now that we've got all these swanky files laying around, we need a way to tell the computer what to do with them. Ready for the next chapter? Let's do this!