Subscribe for weekly commentary and coverage of Swift and Apple platform development. Written by Dave Verwer and published every Friday. Free.

Picture of Dave Verwer

Issue 446

6th March 2020

Written by Dave Verwer

Comment

In the light of so many tech conferences being postponed, cancelled, or going virtual there’s plenty of speculation about this year’s WWDC, especially as we get close to the date Apple might typically announce it.

So I started thinking about what an online-only, virtual version of the conference might look like, but as I wrote more words on it, I wanted to cross-reference the data from the iOS Developer Community Survey so I moved my draft over there and published it yesterday.

Here it is: Is WWDC already a virtual conference?

I’ll finish with a quick note about the 403 errors from last week. Everything should be fixed now, so please let me know if you see anything wrong today!

Dave Verwer

Learn How Verizon Achieved 99.9% Crash-Free Sessions

If you’re building or managing a world-class app, see how Verizon reached a very stable and robust app efficiently. By relying on Instabug, their team was able to track, measure and manage crash data reaching 99.9% crash-free sessions. Learn more here.

News

Rewriting Messenger to be faster, smaller, and simpler

Despite everything you saw on Twitter about this article during the week, this isn’t about switching from a cross-platform codebase to a native one. It’s the story of an app rewrite from native to native. It goes against conventional wisdom to do this, but it sounds like this one has been a success.

The most interesting part of the article for me was the section titled “Use the OS”:

While UI frameworks can be powerful and increase developer productivity, they require constant upkeep and maintenance to keep up with the ever-changing mobile OS landscape. Rather than reinventing the wheel, we used the UI framework available on the device’s native OS to support a wider variety of application feature needs.

I regularly hear stories from developers at large companies where they’ve made their own abstractions on top of the UI frameworks. It’s so tempting, especially if Xcode can’t handle your scale, so why not? Unfortunately, those stories are rarely happy ones. 🚑

Or… maybe this is the right take on it? 🍻


Apple now lets apps send ads in push notifications

The biggest issue by far is the wording:

unless customers have explicitly opted in to receive them via consent language displayed in your app’s UI, and you provide a method in your app for a user to opt out from receiving such messages.

That’s so ambiguous it’s almost painful to read. Do apps need to separate marketing pushes from other pushes? Will they police the inclusion of a marketing opt-out any more effectively than they did with the original rule? The proof in this pudding will start to be revealed by how Apple implement it for their own apps like Apple Music, News+, TV+, etc…

Tools

Another issue with SwiftPM Xcode integration

I’ve had ded aliased in my shell since 2012, but as Jesse Squires points out in this follow up to last week’s post SPM might finally stop us from using an rm -rf when “Clean Build Folder” should do the trick. Old habits die really hard though… 😬


Swift Package Continuous Integration Guide

Are you writing an open-source library for Swift that’s compatible with the Swift Package Manager? Are you running CI for it? If not, then Leo Dion has everything you could possibly want to know on the subject. It’s a long artucle, so settle in… ☕️


Arena

Want to quickly open up a Swift Playground in Xcode with a Swift Package Manager library already imported and ready to play with? Sven Schmidt has just the tool for you. 👍

Code

Announcing ArgumentParser

Parsing command-line arguments seems like it should be simple, but as soon as you get past a single, simple value there are so many things that we just expect to work that it can turn into a real task. Here’s a new framework from Apple that makes it as simple as working with a property wrapper. 🙌

While we’re on the subject of building command-line tools, if you’re in the mood then you might also want to read Federico Zanetello’s ultimate guide to Swift executables, and Gui Rambo’s take on using command line arguments in an iOS app.


Introducing Time

I’ve quite genuinely abandoned an idea for a side project once because of the amount of date and time maths that it involved. I decided my life would be happier if I just… didn’t. 😂 Dave DeLong is a much braver soul, and a better developer than me though! I’ve linked to this once before, more than two years ago, but it’s worth another link now it’s released. I’d suggest starting with the documentation if you want to dig into it.


TextField in SwiftUI

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.


Random Acts of Pragmatism

I’ve had a few whinges recently about some of the new language features in Swift that I don’t think necessarily make the language better. This post from Sam Deane is a nice reminder that it’s still a beautiful language, full of little delights that make us more productive. 😍

Jobs

iOS Developer @ komoot – Komoot is changing the way people explore. Our technology empowers millions of people to get outside and discover more of the great outdoors - and we want you to join us! – Remote (within UTC-1 to UTC+3 timezones)

Is your company hiring? I’d love it if you let your recruiting/HR department know that they can post iOS development job listings, right here, for free. It’ll only take you a second, and you’ll get colleagues who already read iOS Dev Weekly! 👍

And finally...

When you break code intentionally