Saving and Loading TodoList

iTahDoodle is now functional. Unfortunately, it forgets the to-do list every time the app is launched. You need to add the ability for TodoList to save and load its state.

Saving TodoList

In Chapter 26, you implemented document saving and loading by taking advantage of features of the NSDocument class. Document-based Mac apps follow patterns (both in the code and the user interface) that have existed for years in Mac OS X. Most iOS apps, on the other hand, do not operate on documents. iTahDoodle definitely does not – there is a single to-do list, and the user will expect it to stick around.

All iOS applications live inside of an application sandbox. This means that your app cannot see files created ...

Get Swift Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.