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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.