让建站和SEO变得简单

让不懂建站的用户快速建站,让会建站的提高建站效率!

你的位置:金都购彩 > 首页 > iOS 15 中 Swift 和 SwiftUI 的使用情况
iOS 15 中 Swift 和 SwiftUI 的使用情况
发布日期:2022-03-13 19:06    点击次数:185

iOS 15 于 2021 年 9 月发布。但你贯通 iOS 15 有若干个二进制文献吗?它使用了哪些编程谈话来拓荒这些应用依次?有若干应用依次是用 Swift 编写的?Apple 是否为某些内置应用依次遴荐了 SwiftUI?

近日,拓荒者通过分析 iOS 15 的内置应用得出了论断(这里拓荒者分析的 iOS 指内核之上的一切东西,不包括 XNU 内核和底层固件)。

iOS 15 中的 Swift 和 SwiftUI

iOS 15 包含 114 个使用 SwiftUI 的二进制文献,着实是 iOS 14 的 3 倍。相似,包含至少一滑 Swift 代码的二进制文献的数目在 iOS 14 和 iOS 15 之间多了差未几两倍:

如图表所示,Apple 不绝在其内置应用依次中慢慢遴荐 Swift。本年亦然遴荐 SwiftUI 的伏击一年。一些粗野使用的应用依次目下似乎在 iOS 15 中使用 SwiftUI:

Books Maps Notes Weather Tips Music Podcasts FaceTime? (InCallService) AppSettings?

还有在 iOS 15 之前就已运期骗用 SwiftUI 的 5 个应用:

Translate Shortcuts Phone AirPods Connect Pop-up? (SharingViewService) Lock Screen? (SleepLockScreen)

其他使用 SwiftUI 的二进制文献主如果小部件或新框架。底下是使用 SwiftUI 的 114 个二进制文献的齐备列表:

 

/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 
二进制文献总额

iOS 15 由 4738 个二进制文献构成,高于 iOS 14 中的 4173 个,新增了 565 个新二进制文献。

编程谈话的演变

通过分析从 iPhone OS 1.0 到 iOS 15 的总计 iOS 主要版块,不错看到 iOS 使用的编程谈话的演变。请稳妥,单个二进制文献不错策画屡次,因此下图中二进制文献的总和大于二进制文献的总额:

在 iOS 15 中的总计二进制文献中:

89% 使用 Objective-C 17% 使用 C++ 13% 使用 Swift 8% 十足用 C 编写 2% 使用 SwiftUI

由此可见:

Objective-C 仍然是 iOS 的中枢 Apple 对 Swift 的使用比以往任何时分都更快。客岁 Swift 的代码量比例卓著了 C,本年则越来越接近 C++ SwiftUI 客岁着实莫得引起人们的稳妥,但本年 Apple 似乎更粗野地遴荐了它,即使是在旗舰应用依次中 C++ 和 C 仍然饰演着伏击的扮装。这些谈话往往由与音频、视频、电话、Web 和其他底层框架关系的二进制文献使用

下图是每种编程谈话演变的另一种暗示体式:

终末,这名拓荒者提供了原始数据,如果你也但愿进行更真切的分析,可检讨从 iPhone OS 1.0 到 iOS 15.0 的总计主要 iOS 版块生成的原始数据。

本文转自OSCHINA

本文标题:iOS 15 中 Swift 和 SwiftUI 的使用情况

本文地址:https://www.oschina.net/news/174934/state-of-swift-and-swiftui-ios15