Paquete «click»

Every click application package must embed at least 3 files:

ficheiro manifest.json

Contén declaracións de aplicativos como o nome do aplicativo, a descrición, o autor, o marco sdk target e a versión.

Example manifest.json file:

{
    "name": "myapp.author",
    "title": "App Title",
    "version": "0.1"
    "description": "Description of the app",
    "framework": "ubuntu-sdk-16.04",
    "maintainer": "xxxx <xxx@xxxx>",
    "hooks": {
        "myapp": {
            "apparmor": "apparmor.json",
            "desktop": "app.desktop"
        }
    }
}
Ficheiro de política do perfil AppArmor

Contains which policy the app needs to work properly. See Security and app isolation below for more information on this file.

ficheiro .desktop

O ficheiro do iniciador indicará a UT como iniciar o aplicativo, que nome e icona amosar na pantalla de inicio e algunhas outras propiedades.

Example of app.desktop:

[Desktop Entry]
Name=Application title
Exec=qmlscene qml/Main.qml
Icon=assets/logo.svg
Terminal=false
Type=Application
X-Ubuntu-Touch=true

Lista non exhaustiva de propiedades:

  • Nome: o título do aplicativo amosouse no guión

  • Exec: ruta ao ficheiro executable

  • Icona: ruta á icona que se amosa

  • Terminal: false if will not run in terminal window

  • Tipo: especifica o tipo de ficheiro de inicio. O tipo pode ser Aplicativo, Ligazón ou Directorio.

  • X-Ubuntu-Touch: true to make the app visible

  • X-Ubuntu-XMir-Enable: true if your app is built for X

  • X-Ubuntu-Supported-Orientations: landscape or portrait to force your app start in landscape mode and portrait mode respectively.

Seguridade e illamento de aplicativos

All Ubuntu apps are confined respecting AppArmor access control mechanism (see Application Confinement) , meaning they only have access to their own resources and are isolated from other apps and parts of the system. The developer must declare which policy groups are needed for the app or scope to function properly with an apparmor .json file.

Example apparmor.json file:

{
    "policy_version": 16.04,
    "policy_groups": [
        "networking",
        "webview",
        "content_exchange"
    ]

}

For a full list of available policy groups, see Grupos de políticas de «AppArmor».