Previous episode: 07. String
Next episode: 09. Conclusion
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
In this challenge, you'll learn about what's happening behind the scenes when you save a string with its write method. Here you've got a method that creates a data object out of a string using a string encoding. Create a URL to save your string from the previous episode using this new method you just saw about. Then read the saved string back. (upbeat music) Let's go over the challenge. Regardless of the outcome, kudos to you for giving it a shot. Creating a URL for your file is something you have done a few times by now. How did you do with writing the string to a file? In the atomically parameter? In your apps atomically is an important one. It allows you to write to a URL while avoiding potential file corruption. For reading the file back, I went with a string initializer. Your sidebar should show that you've successfully read back your four cat emoji, excellent.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.