iOS 16 was just released so let’s analyze its built-in apps. Like in the past years, I will try to answer a couple of questions: How many binaries are in iOS 16? Which programming languages are used to develop these apps? How many apps are written with Swift? What is the percentage of apps using SwiftUI versus UIKit?
- Easily preview Mermaid diagrams
- Live update when editing
- Capture screenshots
- Create PNG from the Terminal
- Free download on the Mac App Store
Methodology
The methodology and tools to create this article have been detailed in my previous posts. If you are interested, please refer to:
- Apple’s use of AppKit, Mac Catalyst and SwiftUI in macOS
- Evolution of the programming languages from iPhone OS 1.0 to iOS 14
- Apple’s use of Swift in iOS 10.1 and macOS 10.12.
Before jumping into the details, let’s clarify a few points:
I only analyzed what is commonly called ‘iOS’, i.e. everything above the kernel. The XNU kernel and low-level firmwares (SecureROM, Baseband, …) are not included even if the Secure Enclave now contains Swift code. On the other hand, I counted the frameworks located inside the dyld shared cache, a mechanism introduced in iPhone OS 3.1.
Keep in mind that a developer can mix different programming languages to create one binary. One example is an app I developed, Clatters, where I use Swift, SwiftUI, Objective-C and C, the most appropriate programming language being used to solve each specific problem. In this article, an app containing a single line of Swift code will be counted as using Swift.
You will see mentions of Objective-C and C++ but you might notice the absence of Objective-C++. The approach used here can’t really detect binaries built with Objective-C++. Such binaries are counted as using both Objective-C and C++.
Finally you should take this analysis with a grain of salt. While I believe the overall picture to be accurate, my approach has some limitations due to the simple fact that I don’t have access to the iOS source code and relied on imprecise compilation artifacts.
Number of binaries
Let’s first answer a simple question: How many binaries are in iOS 16? The number of binaries composing iOS continues to increase: iOS 16 contains 5403 binaries, up from 4738 in iOS 15. That’s 665 new binaries.
Swift and SwiftUI in iOS 16
During the Platforms State of the Union at the WWDC 2022, Apple shared its platform vision with a statement directed toward developers creating a new app: “The best way to build an app is with Swift and SwiftUI”. Let’s compare this statement to Apple’s own use of Swift and SwiftUI in iOS 16.
Without surprise, we can clearly confirm that some of the new iOS 16 features have been built using SwiftUI:
- Live Activities (with the SportsKit framework)
- Live Captions (with LiveTranscriptionUI)
- Shared with You (SharedWithYou framework and probably CloudSharingUI, GroupActivities, PeopleViewService)
- Swift Charts framework
When performing this analysis, one number surprised me: iOS 16 only contains 4 apps using the SwiftUI-based app lifecycle:
/Applications/Batteries.app/Batteries
/Applications/FTMInternal-4.app/FTMInternal-4
/private/var/staged_system_apps/Weather.app/Weather
/System/Library/CoreServices/AegirProxyApp.app/AegirProxyApp
Yet the Swift and SwiftUI adoption continues its exponential climb: iOS 16 contains 226 binaries using SwiftUI, which doubled the number from iOS 15. Likewise the number of binaries containing at least one line of Swift code increased consequently between iOS 15 and iOS 16:
Some existing apps and frameworks started to adopt SwiftUI and are worth mentioning:
- AirDropUI
- AirPlayReceiver
- Batteries
- ContactsUI framework
- FaceTime
- Fitness (and the related WorkoutCore framework)
- Health
- HomeUI framework which powers the Home.app
- Podcasts (and the related PodcastsUI framework)
- ProximityAppleIDSetupUI framework
- Some binaries related to Apple Pay (ContactlessReaderUI, CoreIDVUI, FinanceKitUI, PaymentUIBase, …)
- Some binaries related to Music (AppleMediaServicesUI, _MusicKitInternal_SwiftUI, ClarityBoard, …)
- Some binaries related to Shazam (ShazamKitUI, ShazamViewService)
- Feedback Assistant iOS
Evolution of the programming languages
By analyzing all major releases of iOS from iPhone OS 1.0 to iOS 16, we can see the evolution of the programming languages used by iOS. Again please note that a single binary can be counted multiple times, so the sum of the binaries in this graph is greater than the total number of binaries:
Some trends can be better visualized by displaying percentages:
What can we learn from these graphs?
- Objective-C is at the core of iOS and is used directly or indirectly by most apps
- Swift’s usage has increased quickly over the past iOS versions. This year Swift finally surpassed C++
- The use of C++ is stable over the years
- SwiftUI starts to be noticeable which is a great sign: Apple is doing some dogfooding
- C is slowly but surely fading away
UIKit versus SwiftUI
Up until now, we compared SwiftUI to all binaries. SwiftUI being a UI framework, it would be fairer to compare it to other binaries displaying some UI. Native iOS apps can be built with 2 different UI frameworks: UIKit and SwiftUI (note that it is possible to mix both). My approach to count the number of binaries containing UI is not perfect but should give an approximate trend: I simply check if the binaries link against the UIKit or SwiftUI frameworks.
By displaying percentages, we can confirm that SwiftUI is clearly increasing in Apple’s own apps:
Raw Data
You can download below the raw data I generated for all major releases of iOS from iPhone OS 1.0 to iOS 16.0.
Version | Device | Raw Data |
---|---|---|
iOS 16.0.2 (20A380) | iPhone 14 Pro | iOS16.txt |
iOS 15.0 (19A346) | iPhone 13 Pro | iOS15.txt |
iOS 14.0 (18A373) | iPhone X | iOS14.txt |
iOS 13.1 (17A844) | iPhone X | iOS13.txt |
iOS 12.0 (16A366) | iPhone X | iOS12.txt |
iOS 11.1 (15B93) | iPhone X | iOS11.txt |
iOS 10.1 (14B72) | iPhone 5s | iOS10.txt |
iOS 9.0 (13A344) | iPhone 5s | iOS9.txt |
iOS 8.0 (12A365) | iPhone 5s | iOS8.txt |
iOS 7.0.1 (11A470a) | iPhone 5s | iOS7.txt |
iOS 6.0 (10A403) | iPhone 3GS | iOS6.txt |
iOS 5.0 (9A334) | iPhone 3GS | iOS5.txt |
iOS 4.0 (8A293) | iPhone 3GS | iOS4.txt |
iPhone OS 3.0 (7A341) | iPhone 3GS | iOS3.txt |
iPhone OS 2.0 (5A347) | iPhone 2G | iOS2.txt |
iPhone OS 1.0 (1A543a) | iPhone 2G | iOS1.txt |
- Easily preview DOT diagrams
- Live update when editing
- Capture screenshots
- Quick Look integration
- Free download on the Mac App Store
Conclusion
Even though we don’t have access to the iOS source code, we can determine the programming languages used to create the built-in apps in iOS and we can measure the evolution of these languages from iPhone OS 1.0 to iOS 16.
Swift adoption continues its exponential climb and surpassed C++ this year. Similarly SwiftUI starts to be more used inside Apple: the number of binaries using SwiftUI doubled between iOS 15 and iOS 16. Apple doing some dogfooding is a good sign for these frameworks.
As previously mentioned, this approach has obviously some limits and while I believe the overall picture to be accurate, I can’t guarantee that the results are perfectly exact. If you think that I missed something, please reach out to me on Mastodon @timac@mastodon.social.