Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some sort of data persistence to the cover letter view #4

Open
SuzGupta opened this issue Jul 8, 2024 · 2 comments
Open

Add some sort of data persistence to the cover letter view #4

SuzGupta opened this issue Jul 8, 2024 · 2 comments
Assignees

Comments

@SuzGupta
Copy link
Contributor

SuzGupta commented Jul 8, 2024

We need to store data somewhere so we can demonstrate pausing this and resume this around an active Writing Tools session so Writing Tools does not mess up the stored text.

Pasting in from discussion with @drmarkpowell:

  • Store each cover letter and the skills in SwiftData
  • Make some SwiftData classes and start saving them
  • Make sure we can use a binding to connect up one of the letter text String parameters (Letter.body?) to the UIKit-hosted text view and edit it successfully
@SuzGupta
Copy link
Contributor Author

SuzGupta commented Jul 10, 2024

Add models for

  • address block
  • salutation
  • closing
  • letter
  • skill

@SuzGupta
Copy link
Contributor Author

Adding further thoughts from @drmarkpowell as we discuss an easy yet meaningful way to demonstrate the tools pause and resume:

Maybe we can just write changes to a file in documents, or UserDefaults?
That’s all Josh did for App Intents…put all his “database” into a local data file
Maybe we could have a simple “file backup” handler that version controls your edits as you write, and just disable/enable that.
Then it’s completely under your control
You can just define a struct that’s Codable and read/write it at the proper time whenever you see fit, and “pause” it for Writing Tools changes

Link to Josh's repo to see what we can glean: https://github.com/kodecocodes/m3-sai-materials

@SuzGupta SuzGupta changed the title Add some sort of cloud syncing to the cover letter view Add some sort of data persistence to the cover letter view Aug 18, 2024
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

No branches or pull requests

2 participants