In this project we’re going to build a multi-screen app for ordering cupcakes. This will use a couple of forms, which are old news for you, but you’re also going to learn how to make classes conform to Codable
when they have @Published
properties, how to send and receive the order data from the internet, how to validate forms, and more.
As we continue to dig deeper and deeper into Codable
, I hope you’ll continue to be impressed by how flexible and safe it is. In particular, I’d like you to keep in mind how very different it is from the much older UserDefaults
API – it’s so nice not having to worry about typing strings exactly correctly!
Anyway, we have lots to get through so let’s get started: create a new iOS app using the Single View App template, and name it CupcakeCorner. If you haven’t already downloaded the project files for this book, please fetch them now: https://github.com/twostraws/HackingWithSwift
As always we’re going to start with the new techniques you’ll need for the project…
SPONSORED Would you describe yourself as knowledgeable, but struggling when you have to come up with your own code? Fernando Olivares has a new book containing iOS rules you can immediately apply to your coding habits to see dramatic improvements, while also teaching applied programming fundamentals seen in refactored code from published apps.
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.