willhains / Kotoba

Quickly search the built-in iOS dictionary to see definitions of words. Collect words you want to remember.
MIT License
547 stars 59 forks source link

Replace `NSUserDefaults` with something better #34

Open willhains opened 6 years ago

willhains commented 6 years ago

NSUserDefaults was used as a quick temp solution for persistence in the beginning, and I never got around to replacing it with something better.

Candidate replacements, off the top of my head:

(Unfortunately, since Apple won't accept Kotoba for the App Store, CloudKit is off the table, I guess.)

willhains commented 4 years ago

Current plan for this is to store the word history as a file or set of files, ideally in a location of the user's choosing. That way, the user can choose to store their words in iCloud Drive, Dropbox, or anything else supported by the Files app. (Not sure if this would work, or is possible without being in the App Store... needs research.)

If it works, this solution has a very high bird:stone ratio — it can be more robust than NSUserDefaults, enables syncing (#42) across devices, and gives users access to their data for exporting (#29) to wherever they want. The data format can accommodate metadata about each entry, enabling favourites, last-searched date (#14), etc.