Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Swift Concurrency Course

The 5 biggest mistakes iOS Developers make with async/await

App Store Rejections, your UI freezing for 5 seconds, and migration projects taking months instead of days (even if you’ve been writing Swift for years). These could all be the result of common mistakes that are easy to make when writing Swift Concurrency code.

I’ve created a 65+ lessons course, wrote tens of articles on concurrency, and personally migrated 20+ packages to Swift Concurrency over the past months. Even with Swift 6.2 in our hands, it’s easier than ever to make mistakes. Simply, because writting concurrent code has become more complicated.

The good news?

The mistakes are easy to explain, and I’m convinced I can help you prevent them with a free, 5-day email course.

Sign me up for the course

Migrating to Swift 6 can take hours, mistakes are easier than ever

If you start a new project with Swift 6 from the start, you might be fine without many mistakes. The compiler will help you and you have full focus on all the new code you write.

If you’re migrating existing code, however, you want to get it done as soon as possible. You’ll touch base on a lot of existing code, migrating it in such a way that the compiler becomes ‘happy’. I’ve experienced this myself while migrating RocketSim to Swift 6.2 and strict concurrency.

RocketSim contained 20+ packages, and they all had to be migrated step by step. I often found myself in situations where the code wouldn’t compile for a while, until all the code was migrated. This led to rewriting pieces of code, without the opportunity to test them one by one.

The first mistake I highlight in my course is a great example of this:

let notificationsStream = NSWorkspace.shared.notificationCenter
    .notifications(named: NSWorkspace.didActivateApplicationNotification)

for await notification in notificationsStream {
    guard let activeApplication = notification.userInfo![NSWorkspace.applicationUserInfoKey] as? NSRunningApplication else {
        return
    }
    
    guard let bundleIdentifier = activeApplication.bundleIdentifier,
          shouldUpdateForActiveApplication(bundleIdentifier: bundleIdentifier) else {
        return
    }
    
    await recentBuildsProvider.updateApplications()
}

Can you spot the mistake?

I won’t give it away here; you’ll receive the answer for free via swiftconcurrencyplaybook.com.

FREE 5-day email course: The Swift Concurrency Playbook by Antoine van der Lee

FREE 5-Day Email Course: The Swift Concurrency Playbook

A FREE 5-day email course revealing the 5 biggest mistakes iOS developers make with with async/await that lead to App Store rejections And migration projects taking months instead of days (even if you've been writing Swift for years)

Why I spent 50+ hours on creating a free course

It’s mistakes like the one above that made me realize it’s easier than ever to make mistakes. I’ve been building apps since 2009, you would say I’m smart enough to write a simple for loop, isn’t it?

I’m not scared to call out that I’m still making mistakes. What I do want to prevent is letting you make a similar journey. That’s why I took time to create a free 5-day email course that will help you get better at writing Swift Concurrency code.

Want to make sure this 5-Day Email Course is “worth it” before you opt-in?

Here’s everything that’s inside:

  • Day 1 — Mistake 1
    Treating async for loops as normal for loops (and why your app processes only 20% of user’s data, but shows “Upload Complete!” anyway)
  • Day 2 — Mistake 2
    Assuming async methods run in the background by default (and why Apple ends up rejecting your app with “We discovered one or more bugs. The app became unresponsive during normal use.”)
  • Day 3 — Mistake 3
    Ignoring Task cancellation checks in your async operations (and why this leads to App Store reviews “This app drained 73% of my battery in 45 minutes” with 247 people marking it “helpful”)
  • Day 4 — Mistake 4
    Manually migrating existing code to Swift Concurrency (and why this leads your existing code behaving differently than before, causing 2-week migration becoming a 3 month project)
  • Day 5 — Mistake 5
    Manually creating tasks inside onAppear (and why this will lead to duplicate API calls that compound into thousands of dollars)

I purposely dedicated a single email on a single day to keep you focused on just that mistake. It’s a great way of focused learning, allowing you to adopt all information gracefully.

Sign me up for the course

Still not convinced? Let me take you through the course in a video

Prevent yourself from making the same mistakes I did and make the most out of Swift Concurrency. It’s such an amazing improvement to our language and with Strict Concurrency, it’s becoming easier to write thread-safe code.

Thanks!