RSSAmplifier

Blog

Jesse Squires

Turing complete with a stack of 0xdeadbeef

jessesquires.comRSS feed ↗30 posts

Latest posts

Mariposa: a lightweight Swift CLI to automate sharing blog posts to social media

After writing and publishing a new post, I always share to social media because that is how a lot of folks receive updates (also, POSSE ). Because I hate using social media, I have automated this process with a lightweight CLI written in Swift called Mariposa .

Workaround: how to silence individual deprecation warnings in Swift

The Swift compiler has fine-grained controls for compiler warnings. As of Swift 6.2, you can even configure these warnings in Swift Packages . Unfortunately, this is an all-or-nothing approach with no flexibility, unlike the piecemeal control provided by the Clang compiler via #pragma directives .

How to automate perfect screenshots for the Mac App Store

Meeting the requirements for screenshots is a frustrating experience. On iOS, tooling like SimulatorStatusMagic , Nine41 , and fastlane snapshot help make the process easier. However, on macOS there is much less support (and, sadly, demand) for automated tooling — so you are kind of on your own to figure it out. I spent some time recently solving this process for myself. I want to share how I have…

How to remove unwanted Swift Package schemes in Xcode

Xcode automatically creates schemes for your app and other targets included in your project, which allow you to build and run those targets. I recently ran into an issue where Xcode was including schemes from third-party Swift Package dependencies in its auto-populated list. This automatic behavior does not cause any problems, but it can be quite annoying and distracting to have unwanted schemes…

AI Code review is always wrong

I work on a team that has enabled an AI code review tool. And so far, I am unimpressed. Every single time, the code review comments the AI bot leaves on my pull requests are not just wrong, but laughably wrong. When its suggestions are not completely fucking incorrect, they make no sense at all.

Xcode Tip: spell checking

Did you know that Xcode can spell check your code and comments? Based on my experience working on large teams and large Xcode projects, this is a little-known feature. I routinely find spelling errors, not only in code comments but in symbol names. For the latter, this is particularly frustrating when a misspelled symbol is widely used because correcting that error — a rename that affects a…

Reading Notes: From misery to boredom to anxiety

The zine, We Are All Very Anxious: Six Theses on Anxiety and Why It is Effectively Preventing Militancy, and One Possible Strategy for Overcoming It , was published by The Institute for Precarious Consciousness and CrimethInc in 2014. ( Anarchist Library , Zine PDF ). I decided to read it again recently because it felt relevant to the current political moment in the US. It is as prescient as ever.

Type erasure for Equatable and Hashable types in Swift: Lessons from ReactiveCollectionsKit

Type erasure is a method to abstract and encapsulate heterogenous generic types inside a single non-generic concrete type. In programming languages with generic types, this is a mechanism for runtime polymorphism which allows you circumvent the constraints of generics at compile time. In the early days of Swift, generics were more challenging to work with — in particular, protocols with associated…

UIKit DiffableDataSource API inconsistencies with Swift Concurrency annotations explained

UIKit provides two diffable data source APIs, one for collections and one for tables . Recently, while working on ReactiveCollectionKit , I noticed that the APIs were updated for Swift Concurrency in the iOS 18 SDK, but the annotations were inconsistent with the documentation.

Diffing in ReactiveCollectionsKit: Understanding Identity and Equality

Welcome to the next post in my series about ReactiveCollectionsKit . Today I want to discuss diffing. Understanding diffing requires understanding two core concepts: identity and equality . These are two ideas that are also relevant and applicable to programming in general, and can often be confusing for newcomers.

Introducing ReactiveCollectionsKit: A Swift replacement for IGListKit

I recently released a new open source project called ReactiveCollectionsKit . It is a modern, fast, and flexible library for building data-driven, declarative, reactive, and diffable collections and lists for iOS. This library is the culmination of everything I learned from building and maintaining IGListKit , ReactiveLists , and JSQDataSourcesKit . The 4th time’s a charm! 😅 🍀 I truly hope this…

Kintsugi

Kintsugi — no, not that Kintsugi — is the the Japanese art of repairing broken pottery. The process involves mending the breaks in the ceramics with urushi lacquer, essentially gluing the pieces together and filling in any gaps to smooth it out. At the end, you finish off the cracks with a gold powder, which highlights and emphasizes the flaws in the piece rather than attempting to conceal them.…

SwiftUI's Observable macro is not a drop-in replacement for ObservableObject

SwiftUI’s new @Observable macro is not a drop-in replacement for ObservableObject . I learned of a subtle difference in behavior the hard way. Hopefully, I can save you from the same headache I experienced and save you some time.

UI testing improvements in Xcode 16

While the new Swift Testing framework announced this year at WWDC24 is getting a lot of attention, there are some notable improvements coming to UI testing in XCTest in Xcode 16.

Our App Store screenshot nightmare is (almost) over

I previously wrote about how the requirements for screenshots on the App Store have become increasingly burdensome over the years . It is truly a nightmare. But today I have good news to share! Our nightmare is coming to an end, as changes to screenshot requirements were announced at WWDC24 this year.

SwiftUI app lifecycle: issues with ScenePhase and using AppDelegate adaptors

SwiftUI introduced the ScenePhase API in iOS 14 and macOS 11. This was SwiftUI’s answer to handling application lifecycle events. At the same time, SwiftUI introduced UIApplicationDelegateAdaptor for iOS and NSApplicationDelegateAdaptor for macOS, which allow you to provide an AppDelegate on both platforms to receive additional application lifecycle events and other events that were missing from…

Swift concurrency hack for passing non-sendable closures: Uncheck yourself before you wreck yourself

If you have attempted to adopt Swift Concurrency in your codebase, you have certainly needed to address dozens — likely, hundreds — of warnings and errors. Sometimes the issues can be resolved by addressing them directly. That is, your code was incorrect and you simply have to fix it to make it correct. In other scenarios, the resolution is not so straightforward. In particular, it is difficult to…

Workaround: Xcode deletes Package.resolved file and produces 'missing package product' errors

More and more Apple Platform developers are migrating away from CocoaPods in favor the Swift Package Manager , which is Apple’s first-party tool for managing and integrating dependencies. While it is still not quite a complete replacement for CocoaPods, it is getting closer. Unfortunately, SwiftPM’s integration with Xcode still has a number of shortcomings, even though it was introduced with Xcode…

The curious case of Apple's third-party SDK list for privacy manifests

At last year’s WWDC, Apple introduced privacy manifests . They recently sent out a reminder that the deadline for complying with these new requirements is May 1. Privacy manifests expand on the previously introduced privacy “nutrition labels” that are self-reported by developers and displayed on the App Store. Developers must start including a privacy manifest in their apps by the aforementioned…

Workaround: Swift scripts importing Cocoa frameworks broken on macOS 14

On macOS 14 Sonoma there is a regression in Swift 5.9 which causes Swift scripts that import Cocoa frameworks to fail. This issue was first reported by @rdj . I discovered it myself shortly after. There is a ticket open at #68785 on the main Swift repo on GitHub to track the issue.

A simple fastlane setup for solo indie developers

I recently setup fastlane for one of my indie apps, Taxatio , to automate uploading builds and metadata to the App Store — by far, one of the most tedious tasks of app development. While I had used fastlane extensively before when working on teams at companies, I had never actually set it up from scratch. In this post, I want to share how to do that, as well as a lightweight configuration that I…

Mac menu bar apps for sale

My Mac menu bar apps, Red Eye and Lucifer , are now for sale on my new Gumroad store .

Swift protocol requirement quirks

Perhaps “quirks” is not the correct description, but I recently encountered some unexpected behavior when modifying a protocol in Swift. While I was initially slightly confused, how Swift handles protocol requirements does make sense — conformances are more lenient than you might think!

App Store screenshot requirements need to change

Providing screenshots for the App Store has always been a tedious and time-consuming process. But as the number of differently-sized iOS devices has grown and changed over the years, it has become more difficult to manage. (This is why the developer community built tools like fastlane snapshot .) The screenshot requirements for the App Store have increasingly become a burden for developers,…

Workaround: Xcode simctl status_bar is still broken for iOS 17 simulators

While working on updating iOS screenshots for the App Store recently, I discovered that simctl status_bar is still broken . And unfortunately, I do not expect it to be fixed any time soon.

Another frivolous and frustrating App Store rejection

I’m happy to share that I released an update to Taxatio today, but unfortunately it was not without a lot of friction and hassle with the App Store approval process.

A list of books I read in 2023

Continuing another tradition, here are the books I read in 2023. Similar to my previous post highlighting my top posts of 2023, I also skipped publishing my reading list last year, for 2022. Again, I was simply too burnt out by the end of that year. I also did not read that much compared to previous years — thanks again to burnout. You can find previous years here under the #reading-list tag .

Top posts of 2023

To continue my (almost) tradition of sharing my top posts, here are my most popular posts of 2023. You can find previous years here under the #top-posts tag . Last year, 2022, is notably absent from this series — I was too burnt out last year (for a number of reasons) to write one of these posts. So as a bonus, I’ll include my top posts of 2022 here as well! As usual, all of my analytics data is…

How to fix Mac menu bar icons hidden by the MacBook notch

Last week I wrote about setting up a new MacBook Pro — my first Apple Silicon Mac, and thus my first MacBook with a notch. I lamented how poorly macOS interacts with the notch, specifically how menu bar apps and icons simply get hidden if you have too many to display. Lots of folks on Mastodon offered various solutions, and some readers emailed me with options as well. I figured it was worth…

Find me on Mastodon

With the recent announcement that Threads.net is starting to integrate with ActivityPub , I figured it would be a good time to remind folks that you can follow me on Mastodon at @jsq@mastodon.social . Many of my connections have moved over from Twitter — but sadly, not all of them. Although, some have moved over to Threads. If you would like to join Mastodon.social , you can use my invite link .