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

Sometimes works, sometimes not #1

Open
Gargo opened this issue Jun 21, 2023 · 1 comment
Open

Sometimes works, sometimes not #1

Gargo opened this issue Jun 21, 2023 · 1 comment

Comments

@Gargo
Copy link

Gargo commented Jun 21, 2023

Create a Codable structure according to your example and trying to save object, close app, restore object. Sometimes it works sometimes not

@juliand665
Copy link
Owner

Interesting! How quickly are you closing the app, and how? IIRC pressing the stop button in Xcode too soon after writing to defaults doesn't leave time for it to synchronize, and it's generally bad practice to trigger defaults synchronizations manually.

If you close the app by swiping it up in the app switcher, the value should get saved.

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