Sponsored Link
Stream
Stream makes it easy for you to seamlessly integrate real-time experiences into your application. Check out our Swift tutorial to learn how you can get started adding messaging or video to your apps!
News
SSWG 2023 Annual Update
What progress has Swift on the Server had over the past year? Tim Condon and Franz Busch are here with a breakdown of what the workgroup has focused on and their plans for the future.
Code
Setup for remote push notifications
As Natalia Panferova said when she linked to her latest article on Mastodon:
There are a lot of steps involved in preparing an iOS project for remote push notifications.
Yes, there are! This is a blogging technique that I like to call “Writing it down for everyone, and for future you!”
Automating Memory Leak Detection with XCTest
What a clever technique written up by Dan Torres for integrating memory leak tracking into unit tests. I really liked this and I suspect it could be even further automated with a macro. 👍
For full disclosure, Dan mentions that he learned about this technique from an Essential Developer course, and Essential Developer is a regular sponsor of this newsletter.
Adapting an App to visionOS
I enjoyed this article by Stuart Varrall, where he takes his personal cricket app and adapts it to visionOS. I love a real-world story to follow along with, and it’s worth following along with his process.
Note: I can only apologise for the reading experience when you click this link. I got a full-screen subscribe prompt, which covered every word Stuart had written, followed by the article fading out and another subscribe prompt I had to dismiss as I got about halfway through. How did Substack become such a bad reading experience so quickly? It’s not Stuart’s fault, but be warned before you click through.
Swift URL absoluteString versus path
When is a URL, not a URL? When it’s a file URL. Jesse Squires explains.
Design
Typography is impossible
I’m struggling to think of a typography issue I’ve ever tried to solve that Marcin Wichary doesn’t explain perfectly in this wonderful article. If we still did browser bookmarks, this would be at the top of my “You’ll need this all the time” folder. ❤️
Books
Thinking in SwiftUI 2023
When I looked back to the last time I linked to Chris Eidhof and Florian Kugler’s SwiftUI book, I was surprised to see it had been over three years, so it’s time for an update! 😲 They have updated it for SwiftUI ’23, and I’d still thoroughly recommend it.
For full disclosure, I received a review copy of the book.
Jobs
Software Engineer, macOS @ Raycast – Build something you actually use. Ship every two weeks. No bureaucracy bs. Hack on ideas every Friday. Location-independent salary. Remote, UTC ± 3 hours. – Remote (within European timezones)
Don’t forget you can list iOS, macOS, visionOS, or any Swift job over on iOS Dev Jobs for free!
And finally...
I have such fond memories of every iMac I have ever owned, from a Bondi Blue original (which was tragically lost to fire) to a 27” that I used for many, many years. Happy 25th Birthday, iMac!
Comment
If you’ve listened to the last couple of episodes of the Swift Package Index podcast, Swift Package Indexing, you’ll have heard Sven and I talk about package naming.
It’s something that we both spend more time than most thinking about, given what we do, but at the risk of diving directly into one of the hard problems, I’d love to see more consistency with how the Swift community names packages.
Before SwiftPM, package/library naming was mainly PascalCase, with a few packages carrying over some pseudo namespacing left over from Objective-C. But since SwiftPM, things have started to diverge a bit, with all lowercase package names, and then, my pet peeve, packages that include “swift” in the package name. It just feels so unnecessary for packages built for the Swift package manager. 🫨
I understand that in the big wide world of GitHub repository names, you might want to make the repository name indicate the primary language¹, but package manifests have a name field that’s purely for naming, and yet…
I’d usually call for Apple to take a stand here and set a standard, but they are being quite consistent already. Unfortunately, they’re consistently adding the “swift-“ prefix. 😬
Is there some reason I’m missing as to why these names all start with “swift”? I know this is only a small nitpick in the grand scheme of things, but I’d love it if Swift package naming could head back towards PascalCase being the standard, as it used to be.
¹ Although I’d argue GitHub language filtering is better than including the language as part of the repository name.
Dave Verwer