Skip to main content

Day 73

About 2 minSwiftcrashcoursepaul-hudsonswiftswiftuihacking-with-swiftxcodeappstore

Day 73 ๊ด€๋ จ


100 Days of SwiftUI - Day 73

Project 14, part 6

Project 14, part 6

This was another difficult project, but you made it through and I hope your mind is already thinking of ways you can use the skills you learned. Whether thatโ€™s integrating maps for a shopping app, using Face ID to secure data, or something else, every skill youโ€™re learning here will pay off in the long run.

Today weโ€™re on to the review and challenges portion of the project, which is where you can push your skills further with some code of your own. As Ralph Waldo Emerson once said, โ€œunless you try to do something beyond what you have already mastered, you will never grow.โ€ So, think of this as a growth day!

Today you should work through the wrap up chapter for project 14, complete its review, then work through all three of its challenges.

Bucket List: Wrap up

Bucket List: Wrap up
100 Days of SwiftUI - Day 73 - Wrap up

Wrap up

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.

Review what you learned

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.open in new window

Challenge

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.

  1. Allow the user to switch map modes, between the standard mode and hybrid.
  2. Our app silently fails when errors occur during biometric authentication, so add code to show those errors in an alert.
  3. Create another view model, this time for 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!


์ด์ฐฌํฌ (MarkiiimarK)
Never Stop Learning.