The future of The ReactiveSwift Composable Architecture

Introduction The ReactiveSwift Composable Architecture is a fork of the Point-Free Composable Architecture. It uses ReactiveSwift as the basis for the Effect type instead of Apple’s Combine framework. The reason why I created the fork, in May 2020, was because Combine is only available on iOS 13 and macOS 10.15 and later. At the time I was working on a brand new iOS app where I really wanted to use TCA but we couldn’t yet set a minimum deployment target of iOS 13. »

Xcode 12 tabs

Up until Xcode 12 was released, Xcode tabs were a pretty terrible user experience, especially if you also regularly used an actually good code editor like Sublime Text or Visual Studio Code and knew what a good tabs UX was like. In Xcode tabs you could open the same file in 2 (or more) different tabs, for instance, which is close to useless. Xcode tabs worked pretty much like document tabs in any other application. »

Touch ID and Face ID on iOS

Introduction Adding support for Touch ID and Face ID to your app is not always completely straightforward, especially given that the documentation from Apple on the APIs is somewhat sparse and in some cases incorrect. I recently added Face ID and Touch ID support to my company’s app and I thought it would be helpful to document what I found. There is only a single class, LAContext in the LocalAuthentication framework, so it’s surprising how complex it can get. »

Swift and KVO context variables

I came across a crash in my app Memories when using the iOS 11 betas. It happened reliably every time I loaded a video, and the video code uses KVO, as AVFoundation requires you to use it for a lot of things. When I ran the app in Xcode this was the exception that was causing the crash: Simultaneous accesses to 0x1c41ded68, but modification requires exclusive access. Previous access (a modification) started at addObserver(_:forKeyPath:options:context:) Current access (a modification) started at observeValue(forKeyPath:of:change:context:) The hex address was the address of the property I was using as the context passed to addObserver() and which I was checking in observeValue. »

Using PHLivePhotoView with Auto Layout

So, I was working on updating my app Memories to support displaying Live Photos properly and not just as a static image. I took a look at the documentation for PHLivePhotoView and thought that this would be fairly straightforward. For Live Photos, I’ll just use a PHLivePhotoView instead of a UIImageView. Well, as is usually the case when a developer says: “this looks straightforward, I’ll have it done in a couple of hours”, it was not quite so straightforward and had me scratching my head and cursing until 2am until I finally realised what I was doing wrong. »