Repository navigation
feat(storage): read native iOS and Android app storage - #23
Open
lauridskern wants to merge 4 commits into
Open
lauridskern wants to merge 4 commits into
lauridskern wants to merge 4 commits into
Conversation
- Read App Group containers on iOS simulators under AppGroup/<id>/, so shared UserDefaults and SwiftData stores in them are found; reset empties them too. - Recognize SwiftData's default.store and any SQLite file with -wal or -shm companions, and show Core Data and SwiftData dates in the table grid. - Read every table's row count and columns in single queries; parallel sqlite3 processes failed on the write-ahead log lock. - Mark EncryptedSharedPreferences as encrypted and decode Proto DataStore files as numbered fields without a schema. - Add mobile_app_storage_file and file previews in the panel, decoding JSON, binary and XML property lists, NSKeyedArchiver archives, text, and hex.
A SwiftUI app writes UserDefaults, App Group defaults, Core Data, SwiftData, and Codable, plist, and archived files. A Kotlin app writes SharedPreferences, EncryptedSharedPreferences, SQLite, DataStore Preferences and Proto, MMKV, and files.
- Merge the panel's table and file slots into one detail, loaded by one helper that drops a response once a newer detail replaced it; this also fixes a slower earlier table page overwriting the page opened after it. - Describe every SQLite table with one query, replacing the table list and the per-table PRAGMA. - Make Proto DataStore its own store kind instead of re-checking the file name. - Report files too large to preview as their own format. - Move varint, UTF-8, and JSON helpers into encoding.ts, share the Apple date conversion, and drop a cast, an export, and duplicate operation types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Storage tool now works for native iOS and Android apps, not only React Native ones. Two native test apps cover it, and every store type below was checked on a real simulator or emulator.
What changed
default.store)AppGroup/<id>/, including their shared UserDefaults. Reset empties them too.-wal/-shmcompanion counts as SQLite. Core Data and SwiftData dates show as dates in the table grid.mobile_app_storage_filetool does the same for the model.Also fixed:
sqlite3process per table ran in parallel, and the processes failed on the write-ahead log lock. Every table is now described and counted in single queries.Test apps
examples/native-storage-ios: a SwiftUI app writing UserDefaults (every value type), App Group defaults, Core Data, SwiftData, a Codable JSON file, a binary plist, an NSKeyedArchiver archive and text.run.sh <UDID>signs it ad hoc, because the simulator only creates the App Group container when the entitlement is signed.examples/native-storage-android: a Kotlin app (no Compose or code generation) writing SharedPreferences, EncryptedSharedPreferences, SQLite, DataStore Preferences and Proto, MMKV and files. The release build is debuggable sorun-ascan read it.Verification
npm testpasses (783 tests). New tests use real files taken from the test apps:..test:package,test:codex-pluginandcheck:mcp-budgetpass.Notes
1still reads astrue, because MMKV stores no types and the bytes are identical.fileoperation (app_storage.operation.*) andui.storage.filetiming. File contents are never sent.main.