[[441823]] Preface iOS 15 was released a few months ago in September 2021. In this article, I analyzed the built-in apps of iOS 15: - How many binaries are there in iOS 15?
- What programming language was used to develop these applications?
- How many apps have been written using Swift?
- Is Apple adopting SwiftUI for some of its built-in apps?
method The methodology and tools used to create this article are described in detail in my previous post. If you are interested, please refer to: - The evolution of programming languages from iPhone OS 1.0 to iOS 14[1]
- Apple used Swift in iOS 10.1 and macOS 10.12[2]
Before I get into the details, let me clarify a few points: - I only analyzed 'iOS' in the usual sense, i.e. everything above the kernel. The XNU kernel and low-level firmware (SecureROM, baseband, ...) are excluded. On the other hand, I counted frameworks located in the dyld shared cache introduced in iPhone OS 3.1.
- Keep in mind that developers can mix different programming languages to create a single binary. An example is the app I developed, Clutters[3], where I used Swift, SwiftUI, Objective-C, and C, using the most appropriate programming language to solve a specific Dev problem. For the purposes of this article, an app that contains a single line of Swift code will be considered to use Swift.
- You will see Objective-C and C++ mentioned, but you may notice the absence of Objective-C++. The method used here cannot actually detect binaries built with Objective-C++. Such binaries are considered to use both Objective-C and C++.
- Finally, you should take this analysis with a grain of salt. While I believe the overall picture is accurate, my approach has some limitations as I do not have access to the iOS source code and rely on imprecise compilation artifacts.
Swift and SwiftUI in iOS 15 Perhaps one of the most interesting numbers is Apple’s use of Swift and SwiftUI in iOS 15. So let’s start with that! iOS 15 includes 114 binaries that use SwiftUI, nearly 3 times as many as iOS 14. Likewise, the number of binaries that contain at least one line of Swift code doubled between iOS 14 and iOS 15: As you can see, Apple continues to gradually adopt Swift for its own built-in apps. This year has also been a big year for the adoption of SwiftUI. Some widely used apps now appear to be using SwiftUI in iOS 15: - books
- map
- memorandum
- weather
- hint
- music
- podcast
- FaceTime ?(InCallService)
- set up?
These new apps join the five previous apps that used SwiftUI: - translate
- Shortcuts
- Telephone
- AirPods connection popup? (SharingViewService)
- Lock screen? (SleepLockScreen)
The rest of the binaries using SwiftUI are mostly widgets or new frameworks. Here is the full list of the 114 binaries using SwiftUI: - /Applications/AppSettings.app/AppSettings
- /Applications/AppStore.app/PlugIns/AppStoreWidgetsExtension.appex/AppStoreWidgetsExtension
- /Applications/FamilyControlsAuthenticationUI.app/FamilyControlsAuthenticationUI
- /Applications/FindMy.app/PlugIns/FindMyWidgetIntentsItems.appex/FindMyWidgetIntentsItems
- /Applications/FindMy.app/PlugIns/FindMyWidgetIntentsPeople.appex/FindMyWidgetIntentsPeople
- /Applications/FindMy.app/PlugIns/FindMyWidgetItems.appex/FindMyWidgetItems
- /Applications/FindMy.app/PlugIns/FindMyWidgetPeople.appex/FindMyWidgetPeople
- /Applications/FTMInternal-4.app/FTMInternal-4
- /Applications/GameCenterWidgets.app/PlugIns/GCWidgets.appex/GCWidgets
- /Applications/InCallService.app/InCallService
- /Applications/PeopleViewService.app/PlugIns/PeopleWidget_iOSExtension.appex/PeopleWidget_iOSExtension
- /Applications/SleepWidgetContainer.app/PlugIns/SleepWidgetExtension.appex/SleepWidgetExtension
- /private/var/staged_system_apps/Books.app/Books
- /private/var/staged_system_apps/Maps.app/Maps
- /private/var/staged_system_apps/MobileMail.app/PlugIns/MailWidgetExtension.appex/MailWidgetExtension
- /private/var/staged_system_apps/MobileNotes.app/MobileNotes
- /private/var/staged_system_apps/MobileNotes.app/PlugIns/com.apple.mobilenotes.SharingExtension.appex/com.apple.mobilenotes.SharingExtension
- /private/var/staged_system_apps/Music.app/Frameworks/MusicApplication.framework/MusicApplication
- /private/var/staged_system_apps/Podcasts.app/Frameworks/PodcastsStoreUI.framework/PodcastsStoreUI
- /private/var/staged_system_apps/Shortcuts.app/PlugIns/QuickLookExtension.appex/QuickLookExtension
- /private/var/staged_system_apps/Tips.app/Tips
- /private/var/staged_system_apps/Weather.app/Weather
- /System/Library/Assistant/UIPlugins/SiriFindMyUIPlugin.siriUIBundle/SiriFindMyUIPlugin
- /System/Library/Frameworks/_CoreLocationUI_SwiftUI.framework/_CoreLocationUI_SwiftUI
- /System/Library/Frameworks/_MusicKit_SwiftUI.framework/_MusicKit_SwiftUI
- /System/Library/Frameworks/FamilyControls.framework/FamilyControls
- /System/Library/Frameworks/FamilyControls.framework/PlugIns/ActivityPickerExtension.appex/ActivityPickerExtension
- /System/Library/Health/FeedItemPlugins/Heart.healthplugin/Heart
- /System/Library/Health/FeedItemPlugins/Highlights.healthplugin/Highlights
- /System/Library/Health/FeedItemPlugins/MenstrualCyclesAppPlugin.healthplugin/MenstrualCyclesAppPlugin
- /System/Library/Health/FeedItemPlugins/SleepHealthAppPlugin.healthplugin/SleepHealthAppPlugin
- /System/Library/Health/FeedItemPlugins/Summaries.healthplugin/Summaries
- /System/Library/PreferenceBundles/BatteryUsageUI.bundle/BatteryUsageUI
- /System/Library/PreferenceBundles/CoreRoutineSettings.bundle/CoreRoutineSettings
- /System/Library/PreferenceBundles/FocusSettings.bundle/FocusSettings
- /System/Library/PrivateFrameworks/AccessibilitySharedUISupport.framework/AccessibilitySharedUISupport
- /System/Library/PrivateFrameworks/ActionKitUI.framework/ActionKitUI
- /System/Library/PrivateFrameworks/CommandAndControlUI.framework/CommandAndControlUI
- /System/Library/PrivateFrameworks/CoreChartSwift.framework/CoreChartSwift
- /System/Library/PrivateFrameworks/CoreSuggestionsUI.framework/CoreSuggestionsUI
- /System/Library/PrivateFrameworks/FocusSettingsUI.framework/FocusSettingsUI
- /System/Library/PrivateFrameworks/FocusUI.framework/FocusUI
- /System/Library/PrivateFrameworks/HealthExperienceUI.framework/HealthExperienceUI
- /System/Library/PrivateFrameworks/HealthRecordsUI.framework/HealthRecordsUI
- /System/Library/PrivateFrameworks/HealthVisualization.framework/HealthVisualization
- /System/Library/PrivateFrameworks/HearingUI.framework/HearingUI
- /System/Library/PrivateFrameworks/MediaFoundation.framework/MediaFoundation
- /System/Library/PrivateFrameworks/MessagesSupport.framework/MessagesSupport
- /System/Library/PrivateFrameworks/MLKit.framework/MLKit
- /System/Library/PrivateFrameworks/MLKit.framework/PlugIns/com.apple.MLKit.MLModelPreview.appex/com.apple.MLKit.MLModelPreview
- /System/Library/PrivateFrameworks/MLKit.framework/PlugIns/com.apple.MLKit.MLPackagePreview.appex/com.apple.MLKit.MLPackagePreview
- /System/Library/PrivateFrameworks/NotesUI.framework/NotesUI
- /System/Library/PrivateFrameworks/PaymentUI.framework/PaymentUI
- /System/Library/PrivateFrameworks/PeopleUI.framework/PeopleUI
- /System/Library/PrivateFrameworks/PreviewsInjection.framework/PreviewsInjection
- /System/Library/PrivateFrameworks/PreviewsMessaging.framework/PreviewsMessaging
- /System/Library/PrivateFrameworks/ScreenTimeUICore.framework/ScreenTimeUICore
- /System/Library/PrivateFrameworks/SleepHealthUI.framework/SleepHealthUI
- /System/Library/PrivateFrameworks/SleepWidgetUI.framework/SleepWidgetUI
- /System/Library/PrivateFrameworks/SnippetUI.framework/SnippetUI
- /System/Library/PrivateFrameworks/TipKit.framework/TipKit
- /System/Library/PrivateFrameworks/TranslationUI.framework/TranslationUI
- /System/Library/PrivateFrameworks/TranslationUIServices.framework/PlugIns/TranslationUIService.appex/TranslationUIService
- /System/Library/PrivateFrameworks/VideosUI.framework/VideosUI
- /System/Library/PrivateFrameworks/WeatherUI.framework/WeatherUI
- /System/Library/PrivateFrameworks/WorkflowUI.framework/WorkflowUI
- /System/Library/Snippets/UIPlugins/AudioUIPlugin.bundle/AudioUIPlugin
- /System/Library/Snippets/UIPlugins/SiriVideoUIPlugin.bundle/SiriVideoUIPlugin
- /System/Library/Snippets/UIPlugins/SystemPlugin.bundle/SystemPlugin
- /usr/lib/swift/libswiftExtensionKit.dylib
- /usr/libexec/proximitycontrold
Total number of binary files How many binaries can we find in iOS 15? iOS 15 consists of 4738 binaries, up from 4173 in iOS 14. There are 565 new binaries. Number of binary files The evolution of programming languages We can see the evolution of the programming language used by iOS by analyzing all major iOS versions from iPhone OS 1.0 to iOS 15. Note again that a binary file can be evaluated multiple times, so the sum of the binary data in this graph is greater than the total number of binaries: Number of binary files using various programming languages In all binaries for iOS 15: - 89% used Objective-C
- 17% used C++
- 13% used Swift
- 8% use C completely
- 2% used SwiftUI
What can we learn from this? - Objective-C is still at the core of iOS and isn't going away anytime soon.
- Apple's adoption of Swift is progressing faster than ever. Last year, Swift surpassed C. This year, Swift is getting closer and closer to C++.
- SwiftUI was barely noticeable last year, but this year Apple seems to be adopting it more widely, even in flagship apps.
- C++ and C still play an important role. These languages are often used for binaries related to audio, video, telephony, networking, and other low-level frameworks.
Here is another representation of the evolution of various programming languages: The evolution of various programming languages Raw data If you want a more in-depth analysis, you can download below the raw data I generated for all major versions of iPhone OS from 1.0 to iOS 15.0. in conclusion Even though we don’t have access to the iOS source code, we can identify the programming languages used to create built-in apps in iOS and measure the evolution of those languages from iPhone OS 1.0 to iOS 15. As we’ve seen, Apple continues to adopt Swift for its own apps: the number of binaries using Swift doubled between iOS 14 and iOS 15. About 13% of binaries now use Swift. Additionally, Swift UI adoption really started this year, with several flagship apps now using SwiftUI. As mentioned earlier, this approach obviously has some limitations, and while I think the overall picture is accurate, I cannot guarantee that the results are completely accurate. If you think I've missed something, please reach out to me on Twitter. Translated from: Apple's use of Swift and SwiftUI in iOS 15 References [1] The evolution of programming languages from iPhone OS 1.0 to iOS 14: https://blog.timac.org/2020/1019-evolution-of-the-programming-languages-from-iphone-os-to-ios-14/ [2] Apple used Swift in iOS 10.1 and macOS 10.12: https://blog.timac.org/2016/1101-apples-use-of-swift-in-ios-10-1-and-macos-10-12/ [3]Clutters: https://apps.apple.com/app/clatters/id1480930237 |