Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add full-data JSON export/import - #99

Merged
saksham2001 merged 4 commits into
mainfrom
claude/pulseloop-data-export-import-fe4abc
Jul 26, 2026
Merged

saksham2001 merged 4 commits into
mainfrom
claude/pulseloop-data-export-import-fe4abc

Conversation

@saksham2001

Copy link
Copy Markdown
Owner

Summary

Adds a Backup section to Settings → Privacy & Data: export ALL app data (24 SwiftData models, settings blobs, coach attachments — never API keys) to a single plain JSON file, and import it back. Importing into an app that already has data asks "Replace all data?" then wipes and restores atomically (single save, rollback on failure). Enables debugging, moving data between devices, and analyzing data outside the app.

Type of change

  • ✨ New feature (non-breaking change that adds functionality)

How was this tested?

  • Added / updated unit tests (PulseLoopTests) — 6 new tests (round trip, wipe completeness, version/corrupt rejection, settings + attachments); full suite 726/726 green
  • Tested with demo data (-seedDemo YES, no hardware) — simulator: export → uninstall/reinstall → import restores everything; in-app share sheet, file picker, and replace confirmation exercised end-to-end

Privacy & data

  • This change does not send health data off-device without explicit user action.
  • No secrets, API keys, or personal data are committed.

Checklist

  • My code follows the project's style (SwiftLint passes).
  • I ran the tests and they pass.

@saksham2001
saksham2001 merged commit f06be51 into main Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant