Lecture 11: Error Handling Persistence

Опубликовано: 29 Сентябрь 2024
на канале: Stanford
28,651
388

Lecture 11 of Stanford’s iOS development course from Spring 2021 covers a number of persistence topics (UserDefaults, the File System, Codable archiving, and JSON encoding/decoding) and also how errors are handled in Swift. We start adding these capabilities to EmojiArt by making its Model be convertible to/from JSON (using the Codable protocol) and then autosaving an EmojiArt document (for now) into the file system. We also introduce a new ViewModel into EmojiArt, a PaletteStore (a persistent store of emoji palettes), which we’ll use to significantly enhance our emoji palette UI in the next lecture.