Skip to content

SdlSetAppMetadata

Specify metadata about your app through a set of properties.

You can optionally provide metadata about your app to SDL. This is not required, but strongly encouraged.

There are several locations where SDL can make use of metadata (an "About" box in the macOS menu bar, the name of the app can be shown on some audio mixers, etc). Any piece of metadata can be left out, if a specific detail doesn't make sense for the app.

This routine should be called as early as possible, before SdlInit. Multiple calls to this routine are allowed, but various state might not change once it has been set up with a previous call to this routine.

Once set, this metadata can be read using SdlGetAppMetadata.

These are the supported properties:

  • TSdlProperty.AppMetadataName: The human-readable name of the application, like 'My Game 2: Bad Guy's Revenge!'. This will show up anywhere the OS shows the name of the application separately from window titles, such as volume control applets, etc. This defaults to 'SDL Application'.
  • TSdlProperty.AppMetadataVersion: The version of the app that is running; there are no rules on format, so '1.0.3beta2' and 'April 22nd, 2024' and a git hash are all valid options. This has no default.
  • TSdlProperty.AppMetadataIdentifier: A unique string that identifies this app. This must be in reverse-domain format, like 'com.example.mygame2'. This string is used by desktop compositors to identify and group windows together, as well as match applications with associated desktop settings and icons. If you plan to package your application in a container such as Flatpak, the app ID should match the name of your Flatpak container as well. This has no default.
  • TSdlProperty.AppMetadataCreator: The human-readable name of the creator/developer/maker of this app, like 'MojoWorkshop, LLC'
  • TSdlProperty.AppMetadataCopyright: The human-readable copyright notice, like 'Copyright (c) 2025 MojoWorkshop, LLC' or whatnot. Keep this to one line, don't paste a copy of a whole software license in here. This has no default.
  • TSdlProperty.AppMetadataUrl: A URL to the app on the web. Maybe a product page, or a storefront, or even a GitHub repository, for user's further information This has no default.
  • TSdlProperty.AppMetadataType: The type of application this is. Currently this string can be 'game' for a video game, 'mediaplayer' for a media player, or generically 'application' if nothing else applies. Future versions of SDL might add new types. This defaults to 'application'.

Definition

Unit: Neslib.Sdl3.Basics

procedure SdlSetAppMetadata(const AName, AValue: String); overload; inline

Parameters

AName: String : The name of the metadata property to set.

AValue: String : The value of the property, or an empty string to remove that property.

Exceptions

ESdlError: Raised on failure.

See Also

Remarks

It is safe to call this routine from any thread.