Saving Data in iOS
Sep 19 2018 · Video Course (1 hr, 19 mins) · Beginner
Find out where and how to save data in iOS! This course explores common methods for persisting user data, all from within Xcode Playgrounds.
5/5Version
- Swift 4, iOS 12, Xcode 10
Files & Data
Introduction
3:33What is Data, and what does it mean to save it? Find out this action-packed introductory video!
1The user's document folder is a great place to store data. Where is it located? The File Manager knows!
2Paths
3:21Find out what the difference is between a URL and a path, and learn how to create your own useful URLs.
3Challenge: URLs
1:52Combine the two ways you've learned to create URLs. Stick around to the end for a handy tip!
4Save some data! Some Foundation Data! When you've got an array of bytes, you can store them with a Data.
5String
3:11Convert back and forth from bytes, Data instances, and Strings. They're all easily interchangeable as long as your data bytes use the encoding you expect.
6Practice your saving and loading, after converting from String to Data.
7Conclusion
0:44Quickly review what core concepts should feel solid by this point. We'll go over what they'll prepare you for, in the next section.
8JSON & Property Lists
Introduction
0:26If the previous section was handy for you, this one probably will be as well! This video will let you know how we'll be building on what you learned there.
9Learn what JSON is, and get comfortable decoding it for use in Swift. Then you'll be prepared for saving your own JSON, later!
10Saving on Device
7:14Take your saving skills to an iOS app, where you'll investigate where your data will be saved and how your users can interact with it.
11Codable Types
12:17Create your own Codable type, suitable for use with JSON and Property Lists. How does the JSON representation differ from Swift?
12Create a Codable array, and see if you can save and load it the same way you can with individual instances.
13Codable Hierarchies
6:03You're sure to build up complex hierarchies of structs, classes, and enums, in your coding journey. Codable's got you covered!
14Let's get a taste of working with Property Lists before we dive into what they're made of, in the next video.
15Learn what makes up a Property List. Employ your knowledge of JSON to be able to understand how the formats differ.
16Examine the files you stored in the Property List challenge. Also, learn about a few encoding options and how they affect what you can save.
17Conclusion
1:56Review everything you've learned in this section, and find out where your data-saving journey might yet take you!
18
Comments