Today I’m downloading my in-development iOS app container (.xcappdata) from Xcode’s devices and simulators window in order to see what’s stored in the app using Core Data (and eventually use that container to run my tests using testplans). The issue is that I can’t find the file I’m looking for, which is usually named myapp.sqlite. A quick search for .sqlite or .db files and I find nothing that ressemble my Core Data objects.
10 days ago I did the same and found myapp.sqlite, with a really different structure of the container. Today I can’t find the folder Library>Application Support (which contained the database) as an exemple (see below for container structure).
I know some things have changed in my app in 10 days, so I’m rolling back my git to 11 days ago and running and running my app, downloading the container, but the container is roughly the same as before rolling back. The only way to find an “old container” (with a .sqlite) is to delete the app and run with the old git version of the app.
More details about what changed:
- Core Data models were removed and some other were added
- Firebase SDK was added (only the following packages : Crashlytics, Performances, AnalyticsWithoutAdId, and RemoteConfig)
What didn’t changed:
- the Core Data configuration and app conf was and is set to save in CloudKit
- same iOS version
- same device
- same macOS version
- same mac
Old container structure:
AppData
- CloudKit
- somerandomhash
- cloudd_db
- Library
- Application Support
- Caches
- Preferences
- Saved Application State
- SplashBoard
- SyncedPreferences
New container structure:
AppData
- CloudKit
- somerandomhash
- cloudd_db
- Library
- Caches
- Saved Application State
- SyncedPreferences
- WebKit
Anyone has any insight on what has happened ? How can I find my Core Data objects locally ? And how can I get an app container that contains my Core Data objects in order to run UI tests with those objects already there ? (I tried to use the up to date container that’s changed but it doesn’t seem to be any data when running my tests)