I think this was our biggest project yet, but we’ve covered a huge amount of ground: adding Comparable
to custom types, finding the documents directory, integrating MapKit, using biometric authentication, secure Data
writing, and much more. And of course you have another real app, and hopefully you’re able to complete the challenges below to take it further.
Although this exact project we made places maps at the center of its existence, they also extremely useful as little bonuses elsewhere – showing where a meeting takes place, or the location of a friend, etc, can add just that extra bit of useful detail to your other projects.
Anyone can sit through a tutorial, but it takes actual work to remember what was taught. It’s my job to make sure you take as much from these tutorials as possible, so I’ve prepared a short review to help you check your learning.
Click here to review what you learned in this project.
One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try extending this app to make sure you fully understand what’s going on.
EditView
. What you put in the view model is down to you, but I would recommend leaving dismiss
and onSave
in the view itself – the former uses the environment, which can only be read by the view, and the latter doesn’t really add anything when moved into the model.Tip: That last challenge will require you to make a State
instance in your EditView
initializer – remember to use an underscore with the property name!
Hacking with Swift+ subscribers can get a complete video solution for this checkpoint here: Solution to Bucket List. If you don’t already subscribe, you can start a free trial today.
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.