Avatar of v_burylov
iOS Developer at FLO HEALTH, INC.·
  • We have been developing all new features in Swift since 2018 - the choice that doesn’t need much explaining in 2023. The Objective-C part of the code is isolated well from the rest of the app and slowly but steadily declines in size.
  • In 2022, we considered SwiftUI mature enough and started using it for all new UI code instead of the Texture framework we had used since 2018. The transition went smoothly since the layout in SwiftUI is based on similar principles as it was in Texture: it's declarative and relies on a container-based system for layout. The Texture framework was preferred over UIKit for the same reason before (and superior performance), but SwiftUI now has all the benefits and is also a first-party tool, actively supported and developed.
  • In 2023 we switched to The Composable Architecture (TCA) for all our business-logic-related code. We have been using Redux-like architecture since 2019, when we decided to pursue this direction instead of the popular MVVM or Viper. It took us some time to adjust to it initially. Still, we enjoyed its benefits immensely: full transparency and control over state mutation, convenient testability, and composability that allows for immense scalability with minimal overhead. Initially, we used our in-house solution inspired by TCA, based on RxSwift. But since then, TCA evolved considerably and added many features that our solution was lacking, including support for modern first-party tools like async/await and Combine, so with the release of 1.0, we finally decided to make the switch. We keep it up to date, and as of Nov 2024, we use version 1.5 of TCA
  • With the switch to SwiftUI and TCA in 2023, we adopted async/await and Combine instead of the previously used RxSwift. Naturally, it became replaced with first-party tools that provide the same or even superior functionality, which the rest of our stack integrates better with.
  • We chose Swift Package Manager (SPM) over CocoaPods or Carthage back in 2020. Like the Swift language itself, it emerged somewhat limited. We watched patiently how it evolved until it received all the features that we needed, like the ability to have binary packages. With SPM, we could fully embrace modularization in our app, allowing us to easily create new internal modules and support any number of them.

Updated: Nov 2024

READ LESS
Flo Health – Medium (medium.com)
17 upvotes·4 comments·9.7K views
Maciek Czarnik
Maciek Czarnik
·
January 30th 2023 at 9:09AM

Good stuff! Good to see immutable value types and reactivity on architectural borders, as well as SPM and Redux 👌 When it comes to Redux - which implementation do you use (3rd party, homegrown...)? Also why RxSwift, not Combine for example? My bet was that you use it as well on other clients to maintain some parity, but it doesn't seem to be the case? One more question, as you decided to go fully separate for iOS and Android stacks - how do you ensure feature parity across platforms?

·
Reply
Vladimir Burylov
Vladimir Burylov
·
February 7th 2023 at 3:11PM

For Redux, we use our in-house solution heavily inspired by TCA (The Composable Architecture by Point Free). RxSwift we chose before Combine was released, and even now, there isn't a lot of pressure for us to migrate to Combine. Regarding feature parity - it's not always possible (due to platform differences) or necessary (if we release experimental features initially on one platform only). In most other cases, we manage to deliver the same user experience despite stack differences.

·
Reply
Piotr Łyczba
Piotr Łyczba
·
July 18th 2023 at 9:04PM

Hi, I've noticed that you use Oblivious HTTP for obfuscating IP addresses. Is this your client's requirement to prioritize users' privacy while designing a networking stack? Have you considered introducing even more anonymity utilizing Tor?

·
Reply
Vladimir Burylov
Vladimir Burylov
·
August 3rd 2023 at 12:54PM

We turn on Oblivious HTTP mode for network communication with our backend for users who enabled the 'Anonymous Mode' feature (which packs a lot of other privacy-related changes as well - you can read about it here: https://flo.health/privacy-portal/anonymous-mode-faq). We never really considered Tor for that. Although it does increase anonymity, we still need to guarantee the protection of user data transferred through the Tor network via custom encryption. With Oblivious HTTP, we get everything out of the box because it has encryption that protects user data while it passes through the relay, while the relay ensures anonymity by cutting IP addresses.

·
Reply
Avatar of Vladimir Burylov

Vladimir Burylov

iOS Developer at FLO HEALTH, INC.