|< Previous: Delivering notifications with CloudKit push messages: CKQuerySubscription||Table of Contents >|
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?
SPONSORED Catch bugs as soon as they happen and know exactly why a crash occurred by integrating Instabug's SDK in one minute. You will automatically receive device data, network logs, and reproduction steps with every bug and crash report.
One of the most effective motivators of success is sharing your progress with other people – when you tell folks what you're doing and what you've learned, it encourages you to come back for more, which in turn will help you reach your app development goals faster.
So, now that you've done all the hard work it's time to share your success: tell folks that you've completed this project, either by clicking the button below to start composing a tweet, or by writing your own message from scratch. This will definitely encourage you to keep learning, but it will also help other folks discover my work – thank you!
Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and a speaker at Swift events around the world. If you're curious you can learn more here.
Link copied to your pasteboard.