Skip to content

Pull request Enable Strict Concurrency Checks on opennetltd/Composed


The primary change here is to enable strict concurrency checks via ~~-Xfrontend -strict-concurrency=complete~~ the StrictConcurrency experimental featyre. The main knock-on effect of this is that @MainActor has been added to most protocols and types.

I also:

  • Bumped the Swift tools version to 5.9
    • With this the name parameter on the dependency declaration has been deprecated
    • This initially 5.7 but have since moved on to Xocde 15.1
  • Removed support for all but UICollectionViews
    • We don't use any of the other view types so this has no impact on us, other than less to update and maintain
    • We did rely on some of the extensions on UITableView. The PR in the main repo now includes these extensions
  • The required initialisers on ArraySection have been removed
    • I planned to remove these soon because they make it harder to subclass, but these have been removed now because they were used for protocol conformances that cannot be satisfied with an actor-isolated function

The Bug That Bit Me Twice


I've been working on a fix for a bug in Overamped, which causes the popover UI shown when tapping on an image in Google Images to be blank, if the link goes to an AMP page. This was a silly bug that never should've happened; knowing that Google can change their page structure at any time I should've been more cautious with my checks.

As a temporary quick fix I removed all custom handling of Google results, tested my changes in the simulator, and uploaded a new build to TestFlight.

After installing the TestFlight update on my phone I checked a search result that I knew recreated the problem, but it was still happening! I have other extensions installed so I disabled some, refreshed, and the bug was fixed!

I thought it would be very strange for the same – very specific – bug to appear in multiple extensions, so I did a little digging.

Keep Reading

Overamped version 1.2.1


Release Notes

  • Fixed an issue that can occur on newer versions of Safari on Google Images
  • Improved layout of popover on larger screens

Partial in Swift


Partial is now available in its own Swift package on GitHub. This post is still valid, but somewhat out of date.

Structs are incredibly useful in Swift, especially when representing static read-only data. However, the values of a struct often come from multiple sources, such as view controllers, network requests, and files on disk, which can make the creation of these structs cumbersome.

There are numerous methods to work around this, but each have their downsides. One of these methods is to change the struct to a class and update the properties to vars, but this removes the advantages of read-only structs. Another is to make a "builder" object, but the API of this object must be kept in-sync with the object is wraps.

Partial eliminates these problems by providing a type-safe API for building structs by utilising generics and KeyPaths. Although I learned of the concept of Partial through TypeScript – which [provides Partial as a built-in type][1] – the Swift implementation supports many more use cases.

Keep Reading