|< Previous: Delivering notifications with CloudKit push messages: CKQuerySubscription||Next: Project 34 >|
This was an epic tutorial: epic in length, epic in breadth, and I hope you'll agree epic in what we've accomplished. You've built another real app, you've learned about
NSSortDescriptor and more, while also having some bonus practice working with
So yes, the tutorial was long, but even though you're tired I'd like to think you're pleased with the end result. Take a break, perhaps even a couple of days, then come back and have a think about how you could improve this project. It's so big there are lots of possibilities, not least:
Whistleclass inherit from
NSObject. Can you make it conform to the
NSCodingprotocol? You might find project 12’s guide to NSCoding and UserDefaults in Swift useful.
AddCommentsViewControllerclass so that it correctly adjusts the text view when the keyboard appears. I already showed you how to do this in project 16.
Of course, the other thing you could do is perhaps the most important of all: go back through all your code and make sure you handle CloudKit errors gracefully. Seriously, put your hand in the air and repeat after me: I promise to show meaningful iCloud errors to my users. Now, I know you didn't actually do that, but you really ought to at least mean it. As Apple has said, handling errors is the difference between working apps and non-working apps, and you don't want a non-working app, do you?
You finished another project, and I'm glad Hacking with Swift helped you. Now I need your help. Please take just a moment out of your day to tell others about Hacking with Swift so they can benefit too.
You can click below to post a tweet straight to this project. Or if you're feeling particularly generous, you can click here to link to Hacking with Swift on your website and help spread the word.
Thank you. Your support is what keeps me going!
Become a Swift guru
I wrote a book called Pro Swift that's dedicated to helping you master the Swift language, and it includes seven hours of video demonstrating each technique!