Using withUnretained in RxSwift 6.0

The story of a new feature leading to a new extension

Michael Long
Better Programming
Published in
5 min readJan 2, 2021

--

RxSwift logo
New RxSwift 6.0 logo via RxSwift GitHub Project

It’s a new year (finally), and with it, we have a new version of RxSwift.

Version 6.0 brings quite a few new features and changes to the table, but the one I want to discuss today is withUnretained and how it solves — and fails to solve — one of the most common problems in our RxSwift…

--

--

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.