App confinement is part of the Ubuntu Touch security concept. Data can be exchanged between apps only according to the AppArmor policies, mainly using the ContentHub. This being said, apps can only read and write files that are located in one of three app specific directories explained in this guide.

Besides the write access to the app directories explained below, the app can write debug messages into the app log file located at /home/phablet/.cache/upstart/application-click-<fullappname>_<appname>_<version>.log. To append messages to the log file, use the Qt debug functions.

This is the place to cache data for later use. The cache is also used by the Content Hub. Files that have been shared with the music app for example can be found in /home/phablet/.cache/com.ubuntu.music/HubIncoming/.

The Qt module Qt.labs.platform provides the QStandardPaths in QML. Unfortunately it is not available on Ubuntu Touch, yet. Probably you don’t want to ship that module with your app. Instead, you could simply let your C++ plugin provide the paths to your QML part. Therefore, add these methods to your plugin class: