Previous episode: 03. Paths
Next episode: 05. Data & Data Types
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.
To go with the string URL you already have, I'm going to challenge you to make your own string and URL to save it to. Store the string in the challengeString constant. Anything you like, it'll do fine. Then use challengeURL to store the URL. The way I'd like you to practice making that is to use the URL initializer used with remindersDataURL. But then take on the txt file extension at the end. You can just name the file the same as the challenge string. Have at it. (upbeat music) I had at it, let's see if you came up with something similar. Since I'm interested in helping myself to not forget things, I called my string To Do List. Then I just used the value of challengeString for the file name. Like everything else so far, I use the document directory as a folder for the file. And then I appended the txt extension. Good work, for completing the challenge, I'll let you know about a handy property to get the file name and extension from a URL as long as it represents a file, lastPathComponent. You've now got some practice with URLs and paths. You'll soon put this to use, but first, a stop to learn about data types in Swift.
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.