Issue 628
22nd September 2023
Written by Dave Verwer
Comment
Happy new device day! Thanks also for all of the kind wishes after last week’s issue. I’m feeling much better, thank you. ❤️
I want to write about this thread on the Swift forums this week. The title, “A New Approach to Testing in Swift”, and the authors being Developer Tools and XCTest team members was enough to make this significant, but the content is even better.
XCTest is a fine testing framework. It has all you need to write everything from a couple of individual unit tests to huge test suites with thousands. Outside of a few additions every year, though, it has looked and felt the same for a long time. This thread gives us a sneak peek at a successor to XCTest, and it’s an open-source package that Apple will develop in public! Even better, we’re being allowed to see it at a very early stage. I’d recommend starting by reading the vision document, but there’s plenty in the repository to explore already. The team are looking for feedback, so please read it and comment on the thread. I can’t wait to see how it develops. 🚀
I’ve dabbled with Quick and Nimble in the past, and while I feel very much at home with their approach, I always fall off, though, because of how their tests integrate with Xcode’s test reporting feature. That’s not the fault of those two (or any other) testing libraries but a symptom of how tightly coupled XCTest and Xcode are.
I am sure this new testing library will be wonderful and become the de-facto testing solution for Swift. However, I also hope the integration between it and Xcode will be open to other testing frameworks. There are hints in the document that point towards this being on the team’s mind, so I don’t think it’s out of the question. If so, I can see this ushering in a new era of fantastic testing tools for Swift in addition to this library.
Sponsored Link
Join a FREE iOS Architect Crash Course before it endsIf you’re a mid/senior iOS developer looking to improve both your skills and salary level, join this free online crash course. It’s available only for a limited time, so get it now.
News
Swift 5.9 ReleasedHere it is! New Xcodes and a new Swift to go alongside. If you’ve not been following along with the betas, there’s everything you need to know in this post on the official Swift blog. 👍
Tools
Core Data Lab and SwiftDataI’ve written about Core Data Lab before, and it remains an excellent companion app with enough features specific to Core Data to make it worthwhile over a “regular” Core Data client, so I was excited to read that there’s a beta available for a new release that adds support for SwiftData!
For full disclosure, I received a copy of this app for free a couple of years ago.
Code
Migrating Ice Cubes to the Observation frameworkYou should read the entirety of Thomas Ricouard’s article on Observable in Ice Cubes, but I did love this summary from the opening paragraphs:
- It’s not a complicated exercise. I did it in a few hours.
- It fixed bugs instead of creating new ones.
- Performance improvements are noticeable and worth it.
What’s not to like in that list? 😍
Inline Snapshot and Macro Testing
I couldn’t decide whether to link to this post on inline snapshot testing or this post on testing Swift macros. I decided on inline snapshotting, which I’ll use daily, where I’ve not yet created any macros! Thanks so much to Brandon Williams and Stephen Celis for both the libraries and for writing guides, too!
For full disclosure, Point-Free sponsors the Swift Package Index. This newsletter is not directly related, but I guess that’s what full disclosure means!
Release Note Highlighting in Sparkle v2.5
I love this new feature of Sparkle, the open-source Mac framework that has tirelessly kept all your apps¹ up to date for over 15 years. Here’s Christian Tietze talking about Nathan Manceaux-Panot’s recent contribution to the project, adding highlighted release notes for when you need to push out a bug fix but don’t want people to miss your significant features from your last update.
¹ At least those installed outside the App Store.
Considering adding a platform? A word of caution
A cautionary tale from Ryan Klumph about adding platforms to a universal app. You can check out any time you like, but you can never leave. 😱
Jobs
Senior iOS Engineer @ Luma AI – We are a small AI research and product company working on new kinds of creative tools for 3D. Our mission is to democratize the 3D experience for all. iOS at Luma is at the center of the product universe. We are growing the iOS team from 1-4, please reach out if you’re interested! – On-site (United States in CA) with some remote work (within US timezones)
Senior iOS Engineer @ sengaro GmbH – We offer an exciting position in Innsbruck (AT) with technical responsibility and conceptual refinements of our long-term products. They’re used in the medical field by paramedics and docs to save lives every day. Become part of it and support people in emergencies! (proficiency in German required) – On-site (Austria) with some remote work (within European timezones)
Are you hiring? I say it every week, but don’t forget that you can post jobs for free to iOS Dev Jobs!