There has been a debate among the iOS developer community about adopting SwiftUI since Apple introduced this framework in 2019. Adopting a new technology is always risky, and comes with many challenges, but we still decided, at NewDay, to adopt this new technology very early in 2020.
This post explains the reasons why we made this decision, the challenges that we faced, and how we embraced SwiftUI in our iOS development process.
SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift. Build user interfaces for any Apple device using just one set of tools and APIs. With a declarative Swift syntax that’s easy to read and natural to write, SwiftUI works seamlessly with new Xcode design tools to keep your code and design perfectly in sync.
- Declarative syntax
- Fast, clean and interactive
- Works well with Combine
- UIKit compatibility
- Supported only on iOS 13+
- Limited list of UI components
- Lack of support from the developer community
- Tightly coupled views
Combine is, by essence, very similar to SwiftUI, and therefore still perfectible. It is a strong contender to replace, in the next few years, other native reactive programming frameworks such as RxSwift or ReactiveSwift.
Combine can be used without SwiftUI, but SwiftUI is very dependent on Combine.
That's the big question. We at NewDay believed very early in 2020 that we could push SwiftUI code to production, and in doing so, would benefit our development and delivery processes.
Our decision was based on several factors:
- iOS 13 adoption rate
- Pushing new features
- Replacing web views by native code
- Launching new applications
- Adopting the latest technologies
The adoption rate of new versions of mobile operating systems has always been much faster on iOS than on Android, and iOS 13 was no exception. Apple released iOS 13.0 on September 2019, and by January 2020, 80% of iOS users (worldwide) already adopted it.
We assumed that given time, this rate would go much higher. We originally thought about pushing our first SwiftUI code to production in September 2020, so very close to the iOS 14 launch date, but we postponed this to later in the year - December 2020.
In February 2021, more than 92.5% of our iOS users use our apps on iOS 14, and with about 4% using iOS 13. These numbers seem to confirm that our original assumption, which was shared with our stakeholders, was correct, and the lack of support of older versions of iOS was not a blocker for fully embracing SwiftUI at NewDay.
We decided to use SwiftUI to implement new features, whenever possible. The very first feature benefitting from this was Aqua Coach, a credit score functionality that we added in the Aqua Card app in December 2020.
Our mobile apps are currently partly hybrid. Some screens just use web views to display contents, which give users a poor user experience.
We plan to keep these web views as long as our apps support iOS 12 (or under), and present brand new native screens, coded in SwiftUI, for our users using iOS 13+ devices.
The new Account Summary will be the first of such screens, and will be available soon.
We have used SwiftUI and Combine to write our brand new bip iOS app. We originally planned to launch the app in September 2020, but decided to postpone to Q2 2021 instead. This decision gave our users, even more time, to adopt iOS 13 (and now iOS 14).
bip is an innovative product, a mobile app only service, targeting a younger generation of users, who, potentially, own recent phones running on the latest version of the operating system.
Using SwiftUI to code all the screens helped us tremendously as there were numerous screens in bip mobile app in terms of application forms.
bip is now available on the App Store and Google Play Store.
NewDay is a tech-driven company. We want to adopt the best practices, the best technologies in order to deliver better, faster and create reliable apps. We also want to attract new talent who want to embrace these goals.
SwiftUI is surely one of the best example of such tools on the iOS platform.
We strongly believe that SwiftUI and Combine will play an important part in iOS development in the years to come. Even though we admit that these frameworks are still perfectible, there is no doubt that Apple will refine and improve them overtime.
Apple being Apple, it is also likely they will start to gradually deprecate UIKit pretty soon, and entice iOS developers to adopt SwiftUI instead.