One more thing...
Hello, you're reading Infinum iOS Cocoa Treats, bringing you the latest iOS related news straight to your inbox every week.
Combining opaque return types with primary associated types
How Swift’s opaque return types can be combined with primary associated types in order to create powerful abstractions without the need for any type erasure.

Read More
Code
Binary Targets in Swift Package Manager (SPM) allow packages to declare xcframework bundles as available targets. The technique is often used to provide access to closed-source libraries and can improve CI performance by reducing time spent on fetching SPM repositories.
A complete Swift programming language reference for beginners with more than a 100 snippets. Now available on Gumroad.

Learn how to make all subviews in HStack have an equal height.

SwiftUI views and view modifiers can be divided into “rendering“ and “non-rendering” groups. The position of the `animation` modifier with respect to non-rendering modifiers is irrelevant for the question if a change gets animated or not.

Using long press and drag gestures in SwiftUI ScrollViews is complicated, since they steal the touch events and cause scrolling to stop working. I’ve been trying to fix this, and have found a way that seems promising, that involves using a button style to handle the scroll blocking gestures.

Misc

When developing for iOS it’s often useful to navigate to the files you create in the simulator so you can inspect everything is how you expect it to be.
Examining why some popular iOS apps suddenly got bigger after releasing with Xcode 14.