Click-Paket¶
Jedes click Anwendungspaket muss mindestens 3 Dateien beinhalten:
manifest.jsonDateiEnthält die Deklarationen der Anwendungen, wie Name, Beschreibung, Autor, Ziel-Framework-SDK und Version.
Example
manifest.jsonfile:{ "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" } } }
- AppArmor-Profilrichtlinien-Datei
Enthält die Rechte, die eine App benötigt, um zu funktionieren. Für mehr Informationen über diese Datei, lies unter Sicherheit und App-Abschottung weiter.
.desktopDateiDer Starter enthält Informationen für UT, wie die App gestartet werden soll, welcher Name und welches Icon auf dem Startbildschirm gezeigt werden sollen und einige weitere Angaben.
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
Unvollständige Liste der Optionen:
Name: Anwendungsname, der im Starter angezeigt wird
Exec: Pfad zur ausführbaren Datei
Icon: Pfad zum angezeigten Symbol
Terminal:
false, falls das Programm nicht im Terminal ausgeführt wirdType: Art des Starters. Möglich sind Application (Anwendung), Link oder Directory (Verzeichnis).
X-Ubuntu-Touch:
true, damit die App angezeigt wirdX-Ubuntu-XMir-Enable:
true, wenn deine App X11 benutztX-Ubuntu-Supported-Orientations:
landscapeorportraitto force your app start in landscape mode and portrait mode respectively.
Sicherheit und App-Abschottung¶
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"
]
}
Eine vollständige Liste der verfügbaren Richtliniengruppen finden Sie in AppArmor-Richtliniengruppen.