自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

iOS 15 中 Swift 和 SwiftUI 的使用情況

移動開發(fā)
iOS 15 于 2021 年 9 月發(fā)布。但你知道 iOS 15 有多少個二進制文件嗎?它使用了哪些編程語言來開發(fā)這些應(yīng)用程序?有多少應(yīng)用程序是用 Swift 編寫的?Apple 是否為某些內(nèi)置應(yīng)用程序采用了 SwiftUI?

iOS 15 于 2021 年 9 月發(fā)布。但你知道 iOS 15 有多少個二進制文件嗎?它使用了哪些編程語言來開發(fā)這些應(yīng)用程序?有多少應(yīng)用程序是用 Swift 編寫的?Apple 是否為某些內(nèi)置應(yīng)用程序采用了 SwiftUI?

[[441631]]

近日,開發(fā)者通過分析 iOS 15 的內(nèi)置應(yīng)用得出了結(jié)論(這里開發(fā)者分析的 iOS 指內(nèi)核之上的一切東西,不包括 XNU 內(nèi)核和底層固件)。

iOS 15 中的 Swift 和 SwiftUI

iOS 15 包含 114 個使用 SwiftUI 的二進制文件,幾乎是 iOS 14 的 3 倍。同樣,包含至少一行 Swift 代碼的二進制文件的數(shù)量在 iOS 14 和 iOS 15 之間多了差不多兩倍:

如圖表所示,Apple 繼續(xù)在其內(nèi)置應(yīng)用程序中逐步采用 Swift。今年也是采用 SwiftUI 的重要一年。一些廣泛使用的應(yīng)用程序現(xiàn)在似乎在 iOS 15 中使用 SwiftUI:

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

還有在 iOS 15 之前就已開始使用 SwiftUI 的 5 個應(yīng)用:

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

其他使用 SwiftUI 的二進制文件主要是小部件或新框架。下面是使用 SwiftUI 的 114 個二進制文件的完整列表:

 

  1. /Applications/AppSettings.app/AppSettings 
  2. /Applications/AppStore.app/PlugIns/AppStoreWidgetsExtension.appex/AppStoreWidgetsExtension 
  3. /Applications/FamilyControlsAuthenticationUI.app/FamilyControlsAuthenticationUI 
  4. /Applications/FindMy.app/PlugIns/FindMyWidgetIntentsItems.appex/FindMyWidgetIntentsItems 
  5. /Applications/FindMy.app/PlugIns/FindMyWidgetIntentsPeople.appex/FindMyWidgetIntentsPeople 
  6. /Applications/FindMy.app/PlugIns/FindMyWidgetItems.appex/FindMyWidgetItems 
  7. /Applications/FindMy.app/PlugIns/FindMyWidgetPeople.appex/FindMyWidgetPeople 
  8. /Applications/FTMInternal-4.app/FTMInternal-4 
  9. /Applications/GameCenterWidgets.app/PlugIns/GCWidgets.appex/GCWidgets 
  10. /Applications/InCallService.app/InCallService 
  11. /Applications/PeopleViewService.app/PlugIns/PeopleWidget_iOSExtension.appex/PeopleWidget_iOSExtension 
  12. /Applications/SleepWidgetContainer.app/PlugIns/SleepWidgetExtension.appex/SleepWidgetExtension 
  13. /private/var/staged_system_apps/Books.app/Books 
  14. /private/var/staged_system_apps/Maps.app/Maps 
  15. /private/var/staged_system_apps/MobileMail.app/PlugIns/MailWidgetExtension.appex/MailWidgetExtension 
  16. /private/var/staged_system_apps/MobileNotes.app/MobileNotes 
  17. /private/var/staged_system_apps/MobileNotes.app/PlugIns/com.apple.mobilenotes.SharingExtension.appex/com.apple.mobilenotes.SharingExtension 
  18. /private/var/staged_system_apps/Music.app/Frameworks/MusicApplication.framework/MusicApplication 
  19. /private/var/staged_system_apps/Podcasts.app/Frameworks/PodcastsStoreUI.framework/PodcastsStoreUI 
  20. /private/var/staged_system_apps/Shortcuts.app/PlugIns/QuickLookExtension.appex/QuickLookExtension 
  21. /private/var/staged_system_apps/Tips.app/Tips 
  22. /private/var/staged_system_apps/Weather.app/Weather 
  23. /System/Library/Assistant/UIPlugins/SiriFindMyUIPlugin.siriUIBundle/SiriFindMyUIPlugin 
  24. /System/Library/Frameworks/_CoreLocationUI_SwiftUI.framework/_CoreLocationUI_SwiftUI 
  25. /System/Library/Frameworks/_MusicKit_SwiftUI.framework/_MusicKit_SwiftUI 
  26. /System/Library/Frameworks/FamilyControls.framework/FamilyControls 
  27. /System/Library/Frameworks/FamilyControls.framework/PlugIns/ActivityPickerExtension.appex/ActivityPickerExtension 
  28. /System/Library/Health/FeedItemPlugins/Heart.healthplugin/Heart 
  29. /System/Library/Health/FeedItemPlugins/Highlights.healthplugin/Highlights 
  30. /System/Library/Health/FeedItemPlugins/MenstrualCyclesAppPlugin.healthplugin/MenstrualCyclesAppPlugin 
  31. /System/Library/Health/FeedItemPlugins/SleepHealthAppPlugin.healthplugin/SleepHealthAppPlugin 
  32. /System/Library/Health/FeedItemPlugins/Summaries.healthplugin/Summaries 
  33. /System/Library/PreferenceBundles/BatteryUsageUI.bundle/BatteryUsageUI 
  34. /System/Library/PreferenceBundles/CoreRoutineSettings.bundle/CoreRoutineSettings 
  35. /System/Library/PreferenceBundles/FocusSettings.bundle/FocusSettings 
  36. /System/Library/PrivateFrameworks/AccessibilitySharedUISupport.framework/AccessibilitySharedUISupport 
  37. /System/Library/PrivateFrameworks/ActionKitUI.framework/ActionKitUI 
  38. /System/Library/PrivateFrameworks/CommandAndControlUI.framework/CommandAndControlUI 
  39. /System/Library/PrivateFrameworks/CoreChartSwift.framework/CoreChartSwift 
  40. /System/Library/PrivateFrameworks/CoreSuggestionsUI.framework/CoreSuggestionsUI 
  41. /System/Library/PrivateFrameworks/FocusSettingsUI.framework/FocusSettingsUI 
  42. /System/Library/PrivateFrameworks/FocusUI.framework/FocusUI 
  43. /System/Library/PrivateFrameworks/HealthExperienceUI.framework/HealthExperienceUI 
  44. /System/Library/PrivateFrameworks/HealthRecordsUI.framework/HealthRecordsUI 
  45. /System/Library/PrivateFrameworks/HealthVisualization.framework/HealthVisualization 
  46. /System/Library/PrivateFrameworks/HearingUI.framework/HearingUI 
  47. /System/Library/PrivateFrameworks/MediaFoundation.framework/MediaFoundation 
  48. /System/Library/PrivateFrameworks/MessagesSupport.framework/MessagesSupport 
  49. /System/Library/PrivateFrameworks/MLKit.framework/MLKit 
  50. /System/Library/PrivateFrameworks/MLKit.framework/PlugIns/com.apple.MLKit.MLModelPreview.appex/com.apple.MLKit.MLModelPreview 
  51. /System/Library/PrivateFrameworks/MLKit.framework/PlugIns/com.apple.MLKit.MLPackagePreview.appex/com.apple.MLKit.MLPackagePreview 
  52. /System/Library/PrivateFrameworks/NotesUI.framework/NotesUI 
  53. /System/Library/PrivateFrameworks/PaymentUI.framework/PaymentUI 
  54. /System/Library/PrivateFrameworks/PeopleUI.framework/PeopleUI 
  55. /System/Library/PrivateFrameworks/PreviewsInjection.framework/PreviewsInjection 
  56. /System/Library/PrivateFrameworks/PreviewsMessaging.framework/PreviewsMessaging 
  57. /System/Library/PrivateFrameworks/ScreenTimeUICore.framework/ScreenTimeUICore 
  58. /System/Library/PrivateFrameworks/SleepHealthUI.framework/SleepHealthUI 
  59. /System/Library/PrivateFrameworks/SleepWidgetUI.framework/SleepWidgetUI 
  60. /System/Library/PrivateFrameworks/SnippetUI.framework/SnippetUI 
  61. /System/Library/PrivateFrameworks/TipKit.framework/TipKit 
  62. /System/Library/PrivateFrameworks/TranslationUI.framework/TranslationUI 
  63. /System/Library/PrivateFrameworks/TranslationUIServices.framework/PlugIns/TranslationUIService.appex/TranslationUIService 
  64. /System/Library/PrivateFrameworks/VideosUI.framework/VideosUI 
  65. /System/Library/PrivateFrameworks/WeatherUI.framework/WeatherUI 
  66. /System/Library/PrivateFrameworks/WorkflowUI.framework/WorkflowUI 
  67. /System/Library/Snippets/UIPlugins/AudioUIPlugin.bundle/AudioUIPlugin 
  68. /System/Library/Snippets/UIPlugins/SiriVideoUIPlugin.bundle/SiriVideoUIPlugin 
  69. /System/Library/Snippets/UIPlugins/SystemPlugin.bundle/SystemPlugin 
  70. /usr/lib/swift/libswiftExtensionKit.dylib 
  71. /usr/libexec/proximitycontrold 

二進制文件總數(shù)

iOS 15 由 4738 個二進制文件組成,高于 iOS 14 中的 4173 個,新增了 565 個新二進制文件。

編程語言的演變

通過分析從 iPhone OS 1.0 到 iOS 15 的所有 iOS 主要版本,可以看到 iOS 使用的編程語言的演變。請注意,單個二進制文件可以計算多次,因此下圖中二進制文件的總和大于二進制文件的總數(shù):

在 iOS 15 中的所有二進制文件中:

  • 89% 使用 Objective-C
  • 17% 使用 C++
  • 13% 使用 Swift
  • 8% 完全用 C 編寫
  • 2% 使用 SwiftUI

由此可見:

  • Objective-C 仍然是 iOS 的核心
  • Apple 對 Swift 的使用比以往任何時候都更快。去年 Swift 的代碼量比例超過了 C,今年則越來越接近 C++
  • SwiftUI 去年幾乎沒有引起人們的注意,但今年 Apple 似乎更廣泛地采用了它,即使是在旗艦應(yīng)用程序中
  • C++ 和 C 仍然扮演著重要的角色。這些語言通常由與音頻、視頻、電話、Web 和其他底層框架相關(guān)的二進制文件使用

下圖是每種編程語言演變的另一種表示形式:

最后,這名開發(fā)者提供了原始數(shù)據(jù),如果你也希望進行更深入的分析,可查看從 iPhone OS 1.0 到 iOS 15.0 的所有主要 iOS 版本生成的原始數(shù)據(jù)。

本文轉(zhuǎn)自O(shè)SCHINA

本文標題:iOS 15 中 Swift 和 SwiftUI 的使用情況

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

責(zé)任編輯:未麗燕 來源: 開源中國
相關(guān)推薦

2009-06-30 14:11:00

Hibernate緩存

2021-12-24 08:55:58

蘋果 iOS 15 SwiftUI

2010-10-14 16:10:28

MySQL排序

2017-01-18 21:57:14

2015-11-09 15:32:34

TorTor網(wǎng)絡(luò)隱私網(wǎng)絡(luò)

2022-07-13 14:26:26

Linux

2010-04-09 13:17:32

2020-12-07 14:20:35

Linux磁盤工具

2018-07-06 14:52:49

Docker容器云服務(wù)

2010-05-12 15:14:59

subversion管

2020-02-10 19:50:08

Linux內(nèi)存使用命令

2009-07-09 18:03:25

tomcatJVM內(nèi)存

2021-03-26 07:17:38

Linux命令磁盤

2010-04-16 10:00:06

Oracle查看表空間

2009-06-16 09:18:26

Linux系統(tǒng)管理系統(tǒng)資源

2020-06-17 14:10:01

Python內(nèi)存程序

2010-06-02 11:06:15

Linux 內(nèi)存監(jiān)控

2017-11-30 18:42:22

PythonCPU腳本分析

2010-02-03 17:16:58

Linux內(nèi)存使用

2009-02-03 09:49:00

FTP空間共享
點贊
收藏

51CTO技術(shù)棧公眾號