As part of our iOS 11 Launch Party, we are releasing a ton of new and updated courses for raywenderlich.com subscribers.
It’s time for course number four: Saving Data in iOS!
This course is a great next step to take after completing Your Second Swift 4 & iOS 11 App, which was released last week.
In this 20-video course, you’ll take a tour of several different ways to save data in iOS, including the popular JSON and Property List formats.
This time around, we reimagined our previous Saving Data in iOS course, and we’re taking a more beginner-friendly approach, aided by the power of Swift 4’s brand new Codable protocol. Let’s have a look at what’s inside.
Section 1: Files & Data
Get an introduction to saving, loading, and converting data in iOS.
This section contains 10 videos:
- Introduction: What is Data, and what does it mean to save it? Find out this action-packed introductory video!
- Document Directory URL: The user’s document folder is a great place to store data. Where is it located? The File Manager knows!
- Paths: Find out what the difference is between a URL and a path, and learn how to create your own useful URLs.
- Challenge: URLs: Combine the two ways you’ve learned to create URLs. Stick around to the end for a handy tip!
- Data: Save some data! Some Foundation Data! When you’ve got an array of bytes, you can store them with a Data.
- String: Convert back and forth from bytes, Data instances, and Strings. They’re all easily interchangeable as long as your data bytes represent Strings using the encoding you expect.
- Challenge: String Data: Practice your saving and loading, after converting from String to Data.
- Copying Image Data: Images contain a whole lot of data. Let’s practice saving it to locations that are more suitable for your app’s needs.
- Challenge: Loading Image Data: Write a method to make it easy to retrieve the PNGs that you’ve saved in your document directory.
- Conclusion: Quickly review what core concepts should feel solid by this point. We’ll go over what they’ll prepare you for, in the next section.
Section 2: JSON & Property Lists
In this section, learn about the new Codable protocol and how to use it in conjunction with JSON and Property Lists.
This section contains 10 videos:
- Introduction: If the previous section was handy for you, this one probably will be as well! This introductory video will let you know how we’ll be building on what you learned there.
- Codable Types: Create your own Codable type, suitable for use with JSON and Property Lists.
- JSON: Learn what JSON is, so you’ll know what to expect when you use it to save your Encodable types.
- JSON Demo: Now you can save an instance of your type, using JSON. Let’s see how the JSON representation differs from Swift, before we load it back.
- Challenge: JSON Arrays: Create a Codable array, and see if you can save and load it the same way you can with individual instances.
- Codable Hierarchies: You’re sure to build up complex hierarchies of structs, classes, and enums, in your coding journey. Codable’s got you covered!
- Challenge: Property Lists: Let’s get a taste of working with Property Lists before we dive into what they’re made of, in the next video. If you’ve become comfortable working with JSON, you should be prepared to work with two new Property List types.
- Property List Anatomy: Learn what makes up a Property List. Employ your knowledge of JSON to be able to understand how the formats differ.
- Comparing Property Lists and JSON: Examine the files you stored in the Property List challenge. Also, learn about a few encoding options and how they affect what you can save.
- Conclusion: Review everything you’ve learned in this section, and find out where your data saving journey might yet take you!
Where To Go From Here?
Want to check out the course? You can watch three of the videos for free:
The rest of the course is for raywenderlich.com subscribers only. Here’s how you can get access:
- If you are a raywenderlich.com subscriber: The entire 20-part course is complete and available today. You can check out the course here.
- If you are not a subscriber yet: What are you waiting for? Subscribe now to get access to our updated Saving Data in iOS course and our entire catalog of over 500 videos.
We’ve still got more planned for the iOS 11 Launch Party, so stay tuned for more new and updated courses to come. I hope you enjoy our course! :]
The post Updated Course: Saving Data in iOS appeared first on Ray Wenderlich.