iOSmacOS

Where Does SwiftData Store Its Database File?

SwiftData persists to a store file in the app's Application Support folder. The filename matches your model container, with cloud mirrors alongside.

Last updated

SwiftData hides its SQLite file behind a friendly API, which means developers go looking for it the first time they need to debug or migrate. By default the store sits in the app's Application Support directory, named after the model container with a store extension. Apps using shared containers or CloudKit keep siblings nearby.

The exact filename is whatever the app passed when creating its ModelContainer, so search Application Support for store and SQLite files if the obvious name misses. Never edit the file while the app runs. Copy it out first, since a live write mid copy corrupts the copy rather than the original, and that wastes an afternoon.

Where SwiftData stores this, by platform

iOS
App Container/Library/Application Support

Per app container under the bundle identifier. Look for store and SQLite files here; the base name follows the app's ModelContainer. Shared group containers hold the copy used for widgets and extensions.

macOS
~/Library/Application Support/[AppName]

Same convention as iOS, directly browsable. Open the app's folder under Application Support and sort by modification date after running the app once.

Frequently asked questions

How do I inspect a SwiftData store?

Copy the file to a Mac and open it with a SQLite browser. The store is a regular SQLite database under the hood, so standard tools read it fine once you have the file.

Does deleting the file erase synced data?

Only the local file. CloudKit data also needs the CloudKit dashboard or a device signed into the same account. Deleting local files while sync is on just re downloads them.

Notice an outdated path? Let us know.