At a glance
- Several years of production use and millions of users made continuity for existing installations essential.
- User data had to remain usable as security protocol implementations and QR payload formats evolved.
- Storage changed from Realm to Core Data, with copied records checked before old databases were removed.
- Supporting iOS 12 restricted use of iOS 13-era CryptoKit, SwiftUI, and Combine. RxSwift remained in use; after the minimum rose to iOS 14 in April 2022, a bridge connected Combine publishers to existing RxSwift flows.
- UIKit and SwiftUI coexisted through hosting controllers and representable adapters.
- I set the technical and architectural direction as the iOS team grew and implemented data migrations and framework integration.
A product that could not start over
The native luca app changed repeatedly during its years on the market. A large installed base meant that a new release had to work with data created by older releases, not just with a fresh installation. At the same time, security-related client implementations and UI technology evolved. The work was therefore less about one isolated feature than about changing a production application without treating its existing state as disposable.
I started in a two-person iOS group with one junior developer. The team later grew to include more employees and freelancers. As iOS lead, I set technology decisions, engineering concepts, and architectural direction for the app. I implemented service infrastructure and data migrations, integrated new UI frameworks, and brought defined security protocol requirements into the iOS client.
Preserving data across storage changes
Data continuity appeared in more than one generation of the app. In 2021, an existing registration record moved from old preferences into a new preferences layer. The migration gained a guard so it ran once. Other changes repaired migration behavior for existing check-ins and settings.
A larger storage change followed in 2024: data held in Realm moved to Core Data. The migration service checked whether old databases existed and whether migration had already completed. It copied documents and key-value records into the new repositories, then compared item counts and encoded values between old and new stores. Only after that check did it mark migration complete and remove the old Realm databases.
flowchart LR Check[Old database present and not migrated?] -->|Yes| Copy[Copy records to Core Data] Copy --> Compare[Compare counts and values] Compare --> Mark[Mark migration complete] Mark --> Remove[Remove old Realm databases]
The ordering matters. The old store remains available while the copied data is checked. If the migration or comparison fails, the completion step is not reached. This mechanism addresses a concrete risk in a long-lived app: a storage replacement must account for the state already on users’ devices.
Evolving security-related client code
The client implementation changed as cryptographic work and QR payload formats evolved. Earlier versions had their own builders and key-history components; later work introduced new payload versions and cryptographic operations. These changes affected the app’s data and integration boundaries, alongside ordinary feature work.
The client-side cryptography case covers one implementation period in more detail.
Bringing SwiftUI into a UIKit application
The app began with UIKit view controllers and later added SwiftUI screens. The two frameworks coexisted rather than changing in one release. A UIKit presenter could place a SwiftUI onboarding view inside UIHostingController, then present it through a UIKit navigation controller. In the other direction, representable adapters let SwiftUI screens use existing UIKit components.
The reactive code also evolved gradually. RxSwift remained in use, and a later adapter converted Combine publishers into RxSwift observables so newer code could participate in existing flows.
That boundary created practical work around presentation, navigation, lifecycle, and ownership. My contributions included SwiftUI screen integration, handling errors and status-bar behavior, and correcting a strong reference to a presenter. Later settings work continued in SwiftUI. Other team members built substantial parts of the UI; the transition was a team effort.
Each transition started with an app already installed on users’ phones. The storage change had to account for their Realm data, while new SwiftUI screens had to work within UIKit navigation. Those constraints shaped the iOS architecture decisions I was responsible for as the team grew.