S Link
Swift and iOS 9 One-Day Bootcamps
Apple hasn't stopped improving, and neither should you. We’re bringing our Swift and iOS 9 training to London and cities across the U.S. In these one-day bootcamps for experienced developers, we'll tour the latest updates in Swift and iOS 9, and teach you how to bring your apps into the future. Each bootcamp is priced at $900. Students who register for both Swift and iOS 9 classes receive a $200 discount.
The Swift Algorithms Book
Written for students and professionals, The Swift Algorithms Book blends modern code, illustrations and computer science to help you pass the interview or build your next app. Perfect for the classroom or the office, the book takes a fresh approach to explain concepts that power search engines, databases and social networks.
Swift Around the Web
Thinking in Swift, Part 1: Saving ponies
The easiest thing to do when starting out in Swift as an Objective-C developer is to write your code just like you do in Objective-C, but in Swift...
Instead, I recommend starting in Swift with a tabula rasa, questioning all your assumptions. Treat it as a brand new language where you know nothing and build up from there instead. Yes, you'll make mistakes, but this is how you're going to really learn Swift! The biggest mistake you can make when moving to Swift is to stick to your old Objective-C habits.
Anyway, enough of the rant from me 😁. Check out this blog post for a more practical guide with code samples on how beautiful it is to think Swiftly.
Swift A Day.
Beautiful daily Swift experiments by @lindadong. You can follow the source code for the projects on Github here.
Coding
Statically-typed NSUserDefaults
A great walk-through of how to really use the power of Swift to make something we already use and take for granted - NSUserDefaults - infinitely better! This is the sort of Swift thinking that I'm excited to see in the iOS community more and more as we all evolve our Swift skills beyond simply translating our Objective-C patterns into Swift.
Protocol Oriented Programming in the Real World
And here is another post that applies a powerful Swift pattern - protocol-oriented programming - to an already-existing library to make it better. I also like the note this post ends on:
There’s a lot to be liked about protocol oriented programming, but the big thing for me is the feeling that I still have a tonne to learn.
We all have a lot to learn when it comes to Swift! And as we keep playing with the "Swift way" of doing things, I'm sure we'll come up with even nicer solutions to our usual problems.
Design
How to write a great error message
Error messages are an after-thought to most of us, especially with looming deadlines and getting the app feature-complete / debugged. After all, our app will always be in happy path... right?!!!
I really love this article - it doesn't just tell us to remember to put in good error messages, but actually shows how error messages can be a powerful component of a truly improved and frustration-free user experience.
Speaking of error message design, I love this.
Other Cool Stuff
Lawn Order
I was completely fascinated by this episode of 99% Invisible: podcast version here. It's about lawns in America. Never realized there were Lawn Enforcement Agents that can get you arrested for neglecting your own lawn! Anyway, don't want to spoil this too much, so make sure check it out!
Tutorials
Shipping an App with App Transport Security - don't panic
I ran into a problem with this in iOS 9 already... and I definitely panicked as I was trying to disable it 😰! This is a great zen-like explanation of what App Transport Security is and how to work with it.
A Tour of iOS Interactive Notifications
Even though Interactive Notifications shipped in iOS 8, I'm continuously disappointed to see very few apps actually make them work. Of course, there are deadlines and other important features. But consider how great of a user-experience improvement adding a shortcut to your notification would be. And it's not even that much work... This tutorial covers how you can do it!
Videos
The Weak, the Strong, and the Unowned
We have ARC now, so we don't have to worry about memory management... right?!!! Well, not exactly... And in Swift, we not only have to worry about the usual weak and strong references, but there is now a third one - unowned! When I first started working with Swift, I would use unowned all the time and get weird crashes. Now I finally understand why those crashes happened and know a little more about when to use each one. Really a must-watch talk by @allonsykraken!
Building Resilient API Clients
@kylefuller talks about building resilient API clients that can adapt to API changes without requiring a deep understanding of the API’s implementation details. Impressive and a very important way of thinking about this topic. Another must-watch talk!
Books
iOS Unit Testing: Beyond the Model
I was mesmerized as @catehstn spoke about getting the app she's building - Show & Hide - to 100% test coverage at iOSDevCampDC last week. Yes, I'm a testing nerd!
One of the big things that Cate talks about is not just testing the usual model layer, but how to lay out your app so you can unit test your views and view controllers as well. I immediately bought this workshop PDF and have not been disappointed.
If you're hesitant about testing your app for whatever reason, consider this great point from Cate's talk:
When asked "I have to move fast, do I test?", the answer is "How long do you want to move fast for?"
WATCH
WatchOS2WatchConnectivityDemos
I've linked to @kristinathai's WatchOS 2 tutorials before. In case you missed them, check these out:
- How to Communicate between Devices Using Watch Connectivity
- Using SendMessage for Instantaneous Data Transfer
- Using Application Context to Transfer Data
So now, I wanted to specifically call out the code samples that go together with these tutorials - I've found looking and playing through actual code to be the most useful way of finally figure out WatchConnectivity.
Swift Code
AlamofireImage - AlamofireImage is an image component library for Alamofire
APNGKit - High performance and delightful way to play with APNG format in iOS.
ActiveLabel.swift - UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
TableCellAnimator - Cut-out animation of a table view cell into the next scene. Write up with an example to view by @ctietze here.
MusicPlayerTransition - Custom interactive transition like Apple Music iOS App.
Swift Thoughts
Last week, I attended iOSDevCampDC where I walked away inspired from all the speakers.
The most inspiring talk for me came from @segiddins, who spoke on a topic I think a lot about - how to pay off technical debt.
The four big techniques Sam mentioned were:
- Slash & Burn - Delete code completely and see what happens. If it was important, re-write it from scratch
- Quarantine - isolate the bad code and work around it
- Zero regressions - "the way to make code better is to never let it get worse". Keep new code clean!
- Boy Scouting - this one is my personal favorite. When you're working in the code and see something bad, just go ahead an fix it. You'd be surprised by how quickly all these little fixes add up!
While we'd all like to think that we'd get to cleaning our bad code "later, when we have time", deep inside we know that later will never come. The key to clean code with low technical debt is tackling the problems head on in the present.