UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

DAY 48

Project 12, part one

Douglas Adams once said, “most of the time spent wrestling with technologies that don't quite work yet is just not worth the effort for end users, however much fun it is for nerds like us.” And of course he was right: when software doesn’t quite work we sometimes see it as a challenge to find a workaround, whereas everyone else in the world just gets annoyed or gives up.

Think about how often you see a Save button in iOS. Hardly ever, right? This isn’t an accident: iOS makes it look like all apps are running all the time when really they get backgrounded or even terminated all the time, but users don’t want to have to think about saving files before a program is quit.

This behavior is a great example of how Apple takes away the annoyance for end users – they don’t have to expend the effort of managing data or worrying about programs, which means they can instead focus on just using their device for the things they actually care about.

Now it falls to us. Project 10 worked great, except that it doesn’t save the pictures users add. Today you’re going to learn one of the ways we can fix that, and we’ll look at a different option tomorrow.

Today you have three topics to work through, and you’ll learn about UserDefaults, NSCoding and more.

Need help? Tweet me @twostraws!


BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

100 Days of Swift

The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.

Back to 100 Days of Swift

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.