Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Issue 85
Oct 19, 2021

Stay updated with the latest in Swift & SwiftUI

The 2nd largest newsletter in the Apple development community with 18,608 developers. Don't miss out – Join today:


3.7x faster builds in Xcode, what does that mean?

We could all use this image and share it with our managers in hope for good news. After yesterday's announcements we're all dreaming of having those beautiful maxed out new MacBooks, but it's definitely not possible for all of us to get one.

Though, I do like to look into the details for app development since Apple explicitly mentions Xcode build times on the MacBook product pages. Compared to their Intel equivalent:

- M1 13 inch 2020 2.8 times faster project builds
- M1 PRO/MAX 14 inch 2021 3.7 times faster project builds

Without diving too much into details around these numbers, I just like to casually use those to convert them into a fun statistic. Say you're currently building your project 20 times a day on an Intel Mac. A clean build takes 60 seconds and on average, we work ~236 days a year:

236 days * 20 builds * 60 seconds = 283200 seconds

That equals 79 hours a year waiting for builds to complete!

What if that becomes 3.7 times faster?
It's surprisingly hard to calculate, but if I'm right it would come down to ~17 seconds of build time:

236 days * 20 builds * 17 seconds = 80240 seconds

That's like 22 hours. In other words, you'll save 57 hours a year
Shouldn't that be enough to convince your managers? I hope so, ha!

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

The Sendable protocol and @Sendable attribute were both features I did not understand. I decided to go deep and write down all my learnings to better understand this feature, which helps create thread safety when working with the latest Swift Concurrency features async/await and Actors.

SPONSORED

Raycast is the Swiss Army knife for your Mac. Create GitHub pull requests, clear derived data, reset SPM, and so much more. Accessible via the keyboard and extendible with an API.

CURATED FROM THE COMMUNITY

CODE

I’ve not only learned about a valid use case for sqrt and pow, but David Cordero also taught me why my volume control behaves differently than sometimes expected.
If you’ve been parsing markdown in your apps, you might want to check out this package. If you’re not into markdown, you can still learn from this repo! It’s always interesting to browse through open-sourced projects and learn from the code implementation. A thing I learned? I didn’t know you could use ssh URLs in Swift package dependency declarations (see readme), ha!
It’s easy to assume your instances will clean up nicely, but what if they don’t? Your memory can grow, and unforeseen issues can occur. This technique demonstrated by Bruno Rocha might help you prevent those cases from happening again.
If there’s one downside I often run into when writing UI tests, it must be the fact that we can’t communicate between the app and tests. John Scott found a solution and developed a package for it so you can solve this.
I bet many of you have been thinking about playing around with the Vision framework one day. Why not use the tips from this article by Kamil Tustanowski and start playing around in a Swift Playground?
I was delighted to read this article by Scott Berrevoets, as we have been discussing scaling up our apps at WeTransfer lately quite a bit. He discusses dependency injection, separating code into modules, and more.

STORIES

I enjoyed this “very-hacky-way-of-debugging” done by Artur Gruchała. In fact, I think you can learn quite a bit from the techniques he uses to finally make the debugger work as he aimed for.
This article took me in many directions. I recognized his story, felt sad to hear Andy Ibanez will take a break but felt happy to read about his plans! Writing an article every week is not an easy task to do, and I recognize his story. Though, do feel inspired if you're thinking about blogging, as Andy shares some great benefits from writing weekly.

SWIFTLEE JOBS

Is your company hiring too? Post your job position for free at SwiftLee Jobs and reach thousands of developers.
We are looking for an iOS Software Engineer who will join our team of talented engineers to design and help us to build the next generation of iOS software. You...
Work with Swift, SwiftUI, and Combine in a project that’s fully written in Swift. A modular foundation built with Swift Package Manager makes it a great project to work in.
Paper® is the immersive sketching app for capturing ideas anywhere. Over 30 million people have found their personal creative space in Paper—handwriting notes, drafting, diagramming, sketching, and giving form to...