Important: Please read the Qt Code of Conduct -

OS X sandbox container path

  • Hello, world!

    I've created OS X application which has some templates set. One to them I want to download in runtime - user needs just one of them, so I moved them out of package and want to download them on demand.

    Application is sandboxed, so I'm going to store downloaded files in sandbox container, as recommended by Apple developers guide. It path looks like:
    "~/Library/Containers/com.domain.product/Data/Library/Application Support/Company/Product/templates/"

    Is there any API in Qt5 I can use to get this folder path in runtime? QStandardPaths doesn't allow to retrieve such info.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Maybe a silly question (I haven't played yet with sandboxed app) but doesn't AppDataLocation return that path once your application is sandboxed ?

  • It returns "~/Library/Application Support/<APPNAME>" for my environment: Qt 5.3.2 (Clang 5.1 (Apple), 64 bit), OS X Yosemite 10.10.1 (14B25)

    As I understand sandboxed app Apple requirements - it is "old style" app data location, and for sandboxed apps it now should be like in starting post.

Log in to reply