The Swift Algorithms Book (now updated for Swift 4.0!)
With new essays, more code, extended content and full support for Swift 4.0, the latest 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. Use discount code "IOSDEV" at checkout to receive 20% off.
Using Unit Tests to Identify & Avoid Memory Leaks
As any software engineer will tell you, memory leaks aren't a matter of “if,” they're a matter of when. Whether you're contributing to an open-sourced project, reviewing code, or working on the next big app, leaking memory is something that should generally be avoided. Here's John with a few examples of how unit tests can be used to identify existing memory leaks and to prevent new ones in the future. I agree that it may be a bit overkill, but worth considering.
One topic that has been talked about consistently since WWDC is how Core Data (or any data persistence framework) will be updated for a SwiftUI and Combine world. The earliest we'll hear about anything official on this will be next year's conference, but do we have to wait that long? Let's see what Drew McCormack has in store for us with his new LLVS project.
Automating perfect iOS simulator status bars
I linked to the Jesse Squires' post on the new simctl
command last week and I'm linking to his follow up post this week. Why? Well this week's post brings automation in the form of this Nine41 script.
What I really want is for every simulator to start up every time with a perfect status bar. Can I link to a blog post that makes that possible next week please Jesse? 🤞
Apple Push Notification Service Update
You're almost certainly already up to date if you use a third-party service to send your pushes, but if you're sending them yourself then you need to read this right now. You need to switch to the HTTP/2-based APNs provider API as soon as possible. It's no longer going to work this month next year.
UPDATE: As Jeff Nouwen notes it's transitioning in 2020, not 2019… I really should learn to pay better attention! 🥴
The fact that some SwiftUI controls include functionality that UIKit doesn't include had passed me by, so thanks to Majid Jabrayilov for pointing it out in his latest post. Formatters make perfect sense in SwiftUI, and while it's obviously possible in UIKit, this is cleaner. I think this kind of feature is how we'll see SwiftUI and UIKit slowly diverge over the next few years.
You're likely spending more time than usual at home right now, so why not take advantage of this kind offer from Michael Flarup to watch his excellent course on icon design? Even if you don't have firm plans to start designing icons, it's free for the next week, so what do you have to lose? It's also being uploaded to YouTube if you prefer to watch there.
Kyle Van Essen makes a great point in this tweetstorm. It may not be possible to reach UI nirvana with SwiftUI yet, but that the benefits it does bring are worth the current compromises. The framework coverage, and ability to polish can come over the next few years, but getting rid of the endless complexity of UI updates in increasingly complex operating environments is priceless.
Fix for the missing network activity indicator on iPhone X 🤕
Surprisingly, Apple left off the network activity indicator on the iPhone X, likely due to space constraints next to the notch. For apps that require a lot of network activity, it may be worthwhile to bring this indicator back for users concerned with data limits. Ortwin Gentz created an elegant replacement that appears in the top-right corner of the screen that is the perfect solution to this problem (other than Apple bringing the indicator back in future releases).
Of course, it's a ticket lottery again so you have until next Thursday to decide if you want to try for it. You also won't be surprised to hear that it's in San Jose again, I think most people agreed it worked really well there last year and it certainly seems logical from Apple's perspective.
I've put my name in the hat... See you there? 🤞