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 640

15th December 2023

Written by Dave Verwer

Comment

2023 has been a fantastic year for me in many ways. This newsletter continues to do well, which is constantly surprising, and the Swift Package Index received support from Apple and continues to grow beyond all expectations. Yet, I feel melancholy as we approach the end of 2023.

I hope you’re not feeling the same way I am, but just in case you are, it’s worth a reminder, and I say this primarily to myself: Breaks from work are essential.

I’m terrible at taking breaks. When I worked for someone else, I always ended the year with spare vacation days as December ended, and that problem only got worse when I started working for myself. It’s not that I never take a day off, but needing to send this newsletter every Friday means I can never switch off for a whole week, which maintains a relatively consistent level of background stress throughout the year. I don’t mean to complain. I know I’m lucky to be in this situation, and there are many jobs with far higher stress, but it doesn’t change the fact that I feel exhausted.

So, I’m going to try to switch off as much as possible for the next two weeks and focus on the positive things that happened this year. I’ll put together the “Best of And Finally…” edition that you’ll receive next Friday as soon as I’ve sent out this issue, and that’s the newsletter done until the new year! I’ll also take as much time as possible off from the package index, and even though I have an idea for a little experiment in the documentation hosting system I’d love to prototype in a few spare days, I think it needs to wait.

Thank you all so much for continuing to read my words here during 2023, for writing all of the blog posts and articles I link to, and for the feedback and kind words you send in replies. I also hope that, wherever possible, you can also take a break over the holidays.

I’ll be back at full capacity, refreshed and ready to go on the 5th of January, and I can’t wait to see what 2024 brings!

Dave Verwer

Add paywalls in one line of code

Take the pain out of configuring and testing your app’s paywalls. With RevenueCat Paywalls you can remotely configure and edit your entire paywall view without waiting on App Review. See how it works here.

News

Get your apps ready for the holidays

It has been this way since 2021, but it’s always nice to remember that you no longer need to plan ahead if you want to change something in App Store Connect or submit a new app update. Just don’t forget what I said about taking breaks, though! Just because you can log in every day during the holidays doesn’t mean you should! 😂

Tools

Plain Swift - a simple Swift IDE for Windows

I’ve linked to a few articles covering Swift on Windows recently, so I was interested to see Dmitry Kozhinov talk about his Swift editor for Windows in the Community Showcase forum. I was also surprised to learn that it’s been around for well over a year, and while it has some limits, such as a lack of support for SwiftPM, this is worth a look if you’re interested in Swift on Windows.


Xcode does not have access to your shell environment

This post from Jesse Squires is a helpful reminder that Xcode can’t access your environment, but there’s one more thing I would have added to the post that I’ll mention here. Don’t forget you can still set environment variables from your project’s scheme configuration. Edit your scheme from the Product menu, select the Arguments tab against the Run behaviour, and set Environment Variables. 👍

Code

Transferable drag & drop on macOS

I’m sure I remember reading the same point that Mathijs Kadijk and Tom Lokhorst make in this post, but in a blog post about an AppKit implementation some years ago, but I don’t remember who wrote it. It turns out that there are some things you’ll want to know when implementing macOS drag and drop with SwiftUI, too!


Should you add final to all your Swift classes?

I’d imagine that at some point while using Swift, someone you’ve talked with will have brought up the idea of just marking all class definitions as final. Junda Ong writes about where you might just be making work for yourself.


Decoupled stacked sheet navigation with multiple modals

You probably don’t want to overuse “sheets” for too much of your UI, but there are valid cases where you might want to present one sheet from another, and you find SwiftUI trying to discourage you with an error message. Martin Pfundmair digs into how to make things a little easier with the help of the Ice Cubes open-source code.


Adding AI-generated image description to Ice Cubes

Talking of Ice Cubes, Thomas Ricouard recently used OpenAI’s vision APIs to generate image descriptions and wrote up how (and why!) he approached the problem, and it’s worth a read.

Design

Design tool canvas handles

How hard can it be to design the “handles” that are common in apps that let users position and transform boxes or other shapes on a canvas? Like most design problems, it can be very tricky once you look beyond the basics. Let Marc Edwards take you through some of the decisions behind designing this kind of feature well.

Jobs

iOS Developer @ Nos.social – Nos social is our attempt to build healthier social media by flipping the power dynamics of social media on their head. It’s part of an emerging social ecosystem built on the Nostr protocol. We’re a fully remote, iOS first, open source, small team working together to build something great. Join us! – Remote (within US timezones) with some on-site work (United States)

And finally...

I love a good easter egg! 🐣