Skip to content

Change database directory from .DocumentDirectory to .ApplicationSupportDirectory #76

@cdzombak

Description

@cdzombak

In a few places, you've recommended storing the SQLite database file in .DocumentDirectory:

What's the rationale behind this recommendation?

I've been placing my databases in .ApplicationSupportDirectory with the understanding that the Documents directory is reserved for files which are meaningful, not opaque, to the user.

Guidelines on this are not perfectly clear, but include these notes:

Put user data in Documents/. User data generally includes any files you might want to expose to the user—anything you might want the user to create, import, delete or edit. For a drawing app, user data includes any graphic files the user might create. For a text editor, it includes the text files.

Put app-created support files in the Library/Application support/ directory. In general, this directory includes files that the app uses to run but that should remain hidden from the user. This directory can also include data files…

Given that, and my recollection of app rejections for placing databases in the Documents directory, I have assumed that opaque datastores like SQLite DBs belong in Application Support, and only text/image and similar files belong in Documents.

Is there additional reasoning behind this recommendation which I may be missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions