Now that iOS 17 is available, let’s analyze its built-in apps to answer a few questions: How many binaries are in iOS 17? 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?
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 are not included. Note that this year, I analyzed the Secure Enclave.
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 a Mac app I developed, Dependencies, where I use Swift, Objective-C, C++, and C, the most appropriate programming language 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 because 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 17? The number of binaries composing iOS continues to increase: iOS 17 contains 6030 binaries, up from 5403 in iOS 16. That’s 627 new binaries.
Swift and SwiftUI in iOS 17
Unsurprisingly, there has been a significant increase in the number of apps adopting SwiftUI this year. Notable mentions include:
- The Preferences app with several of its bundles (StorageSettingsUI, WallpaperSettings, MultitaskingAndGesturesSettings, ThirdPartyApplicationSettings, ActionButtonSettings, …)
- Several binaries related to Health (Health.app, HealthUI, MentalHealthUI, WorkoutUI, …)
- The Home app, which appears to have undergone some major changes (Home.app, HomeEnergyUI, HomeUICommon, HomeDataModel, HomeAccessoryControlUI, …)
- The support for the new Action button (ActionButtonSettings, ActionButtonConfigurationUI, …)
- Additionally, several other important apps, such as Calendar and Reminders, are now using SwiftUI
In iOS 16, only 4 apps used the SwiftUI-based app lifecycle. In iOS 17, this figure has grown to 14 apps:
/Applications/Batteries.app/Batteries /Applications/ClarityCamera.app/ClarityCamera /Applications/ClarityPhotos.app/ClarityPhotos /Applications/FinanceUIService.app/FinanceUIService /Applications/FTMInternal-4.app/FTMInternal-4 /Applications/MusicRecognition.app/MusicRecognition /Applications/PASViewService.app/PASViewService /Applications/Preferences.app/Preferences /Applications/SafetyMonitorApp.app/SafetyMonitorApp /Applications/ShazamEventsApp.app/ShazamEventsApp /Applications/WorkoutRemoteViewService.app/WorkoutRemoteViewService /private/var/staged_system_apps/Weather.app/Weather /System/Library/CoreServices/AegirProxyApp.app/AegirProxyApp /System/Library/CoreServices/ShortcutsActions.app/ShortcutsActions
The Swift and SwiftUI adoption continues its climb: iOS 17 now contains 385 binaries using SwiftUI. Likewise the number of binaries containing at least one line of Swift code increased by 50% between iOS 16 and iOS 17:
Evolution of the programming languages
By analyzing all major releases of iOS from iPhone OS 1.0 to iOS 17, 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 still at the core of iOS and is used directly or indirectly by most apps
- The adoption of Swift and SwiftUI continues to grow rapidly
- The share of Objective-C, C and C++ continues to decrease
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.
For the first time, the number of binaries exclusively using UIKit has decreased in comparison to the previous year:
By displaying percentages, we can confirm that SwiftUI is clearly increasing in Apple’s own apps:
The Secure Enclave is a hardware-based security component, isolated from the main processor to provide an extra layer of security. It was initially introduced with the iPhone 5S to ensure the security of sensitive user data, playing a critical role for Touch ID, Face ID, and Apple Pay.
What's new in Swift session (5:35) of the WWDC22, Apple stated that Swift is now suitable for restricted environments like the Secure Enclave Processor:
In iOS 17, the Secure Enclave contains 19 binaries, and to my surprise, none of them are using Swift:
So is Swift used in the Secure Enclave? Yes! It turns out that the
hibernation binary in macOS Ventura is using Swift:
You can download below the raw data I generated for all major releases of iOS from iPhone OS 1.0 to iOS 17.0.
|iOS 17.0.2 (21A350)||iPhone 15 Pro||iOS17.txt|
|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|
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 17.
Swift and SwiftUI adoptions continue their growth: the number of binaries using these frameworks increased by 50% between iOS 16 and iOS 17. Another good sign of dogfooding is the more widespread use of the SwiftUI-based app lifecycle. Also for the first time, the number of binaries exclusively using UIKit has decreased in comparison to the previous year.
In the upcoming years, it will be interesting to observe whether Swift begins to spread into low-level firmware, such as the Secure Enclave. Currently, Swift is absent from the Secure Enclave in iOS, although macOS does incorporate it.
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 @firstname.lastname@example.org.