A developer shares the experience of rewriting Wally, an iOS wallet app, for iOS 16 and SwiftUI 4. Key changes include extracting app-agnostic code into a local Swift package (WallyKit) to speed up builds and improve separation of concerns, adopting SwiftUI 4 features like NavigationSplitView, Transferable, async/await, and new toolbars, and replacing Quick & Nimble with XCTest. The rewrite also introduces a generic WalletItemStore protocol using the decorator pattern to support multiple item types (cards, receipts, notes, photos) without duplicating code. Realm is retained for data persistence, a skinning system is added via SwiftUI theming, and StoreKit 2 is integrated for a new premium subscription model.

10m read timeFrom danielsaidi.com
Post cover image
Table of contents
BackgroundMigrating old codeMigrating old dataRewriting the app for iOS 16 and SwiftUI 4Adding support for more item typesAdding support for skinsAdding a premium subscriptionReusing functionalityReleasing the appConclusion