I have a SwiftUI sandbox app that uses userDefaults.
I would like to verify that the data is correctly saved and also modify it during development to check that my app behaves correctly.
I can see the data in ~/Library/Containers//Data/Library/Preferences/.plist.
My problem is that when I delete this file to check that my app will behave correctly, then it is re-created with old data. It contains entries that I used for development testing, and not in use any longer. I am unable to get a clean file again.
Where is the original data saved, and how do I access it?
I've looked in:
- ~/Library/Preferences
- ~/Library/Preferences/By Host
- ~/Library/Caches
- ~/Library/Saved Application State
It is not in one of those locations unless it is named differently. Even a search on my mac did not find it.