为何 iOS 越来越偏爱 Swift?

栏目: Swift · 发布时间: 6年前

内容简介:【CSDN编者按】本月初,苹果已经面向所有iPhone用户,推送了iOS 12.0.1正式版。那么,iOS 12.0中Swift的应用是个什么样子?iOS中使用Swift的二进制文件数目又有怎样的变化?一起来看今天的文章!

为何 iOS 越来越偏爱 Swift?

【CSDN编者按】本月初,苹果已经面向所有iPhone用户,推送了iOS 12.0.1正式版。那么,iOS 12.0中Swift的应用是个什么样子?iOS中使用Swift的二进制文件数目又有怎样的变化?一起来看今天的文章!

为何 iOS 越来越偏爱 Swift?

两年前我评估了苹果在iOS 10.1中Swift的应用情况,去年我评估了iOS 11.1中的应用情况。

今年我来分析苹果这个月刚刚发布的iOS 12。

为何 iOS 越来越偏爱 Swift?

方法

本文使用的方法和 工具 在前面的文章里说过了。有兴趣的话可以参考这篇文章:苹果在iOS 10.1和macOS 10.12中对Swift的应用情况(https://blog.timac.org/2016/1101-apples-use-of-swift-in-ios-10-1-and-macos-10-12/)。

为何 iOS 越来越偏爱 Swift?

iOS 12.0中Swift的应用

下面是iOS 12.0中所有使用Swift的二进制文件。注意这些二进制文件可能只包含一行Swift代码,并不一定完全是用Swift写成的。我测试的是iPhone X中的iOS 12.0(16A366)。

/Applications/ActivityMessagesApp.app/PlugIns/ActivityMessagesExtension.appex/ActivityMessagesExtension
/Applications/AppStore.app/AppStore
/Applications/AppStore.app/Frameworks/AppStoreKit.framework/AppStoreKit
/Applications/AppStore.app/Frameworks/JetEngine.framework/JetEngine
/Applications/AppStore.app/PlugIns/AppInstallExtension.appex/AppInstallExtension
/Applications/AppStore.app/PlugIns/BridgeStoreExtension.appex/BridgeStoreExtension
/Applications/AppStore.app/PlugIns/ProductPageExtension.appex/ProductPageExtension
/Applications/BusinessExtensionsWrapper.app/PlugIns/Business.appex/Business
/Applications/ContinuityCamera.app/ContinuityCamera
/Applications/Diagnostics.app/Diagnostics
/Applications/FTMInternal-4.app/FTMInternal-4
/Applications/SharingViewService.app/SharingViewService
/private/var/staged_system_apps/Books.app/Frameworks/AppAnalytics.framework/AppAnalytics
/private/var/staged_system_apps/Calculator.app/Calculator
/private/var/staged_system_apps/Files.app/Files
/private/var/staged_system_apps/Files.app/PlugIns/RecentsWidget.appex/RecentsWidget
/private/var/staged_system_apps/Measure.app/Measure
/private/var/staged_system_apps/Music.app/Music
/private/var/staged_system_apps/Music.app/PlugIns/MusicMessagesApp.appex/MusicMessagesApp
/private/var/staged_system_apps/Music.app/PlugIns/PlaybackIntent.appex/PlaybackIntent
/private/var/staged_system_apps/Music.app/PlugIns/RecentlyPlayedTodayExtension.appex/RecentlyPlayedTodayExtension
/private/var/staged_system_apps/Podcasts.app/Frameworks/AppStoreKit.framework/AppStoreKit
/private/var/staged_system_apps/Podcasts.app/Frameworks/NowPlayingUI.framework/NowPlayingUI
/private/var/staged_system_apps/Podcasts.app/Frameworks/PodcastsUI.framework/PodcastsUI
/private/var/staged_system_apps/Podcasts.app/Podcasts
/private/var/staged_system_apps/Stocks.app/PlugIns/StocksToday.appex/StocksToday
/private/var/staged_system_apps/Stocks.app/Stocks
/System/Library/Accounts/DataclassOwners/StocksDataclassOwner.bundle/StocksDataclassOwner
/System/Library/Accounts/Notification/DonationAccountWatcher.bundle/DonationAccountWatcher
/System/Library/DistributedEvaluation/Plugins/StocksDES.desPlugin/StocksDES
/System/Library/Frameworks/FileProvider.framework/PlugIns/LocalStorageFileProvider.appex/LocalStorageFileProvider
/System/Library/Frameworks/IdentityLookup.framework/XPCServices/com.apple.IdentityLookup.MessageFilter.xpc/com.apple.IdentityLookup.MessageFilter
/System/Library/Messages/iMessageBalloons/ASMessagesProvider.bundle/ASMessagesProvider
/System/Library/PrivateFrameworks/ContactsDonation.framework/Versions/A/Support/contactsdonationagent
/System/Library/PrivateFrameworks/CoreParsec.framework/parsec-fbf
/System/Library/PrivateFrameworks/CoreParsec.framework/parsecd
/System/Library/PrivateFrameworks/DocumentManagerUICore.framework/PlugIns/com.apple.DocumentManager.Service.appex/com.apple.DocumentManager.Service
/System/Library/PrivateFrameworks/DocumentManagerUICore.framework/PlugIns/RecentsAppPopover.appex/RecentsAppPopover
/System/Library/PrivateFrameworks/FMClient.framework/XPCServices/FMIPClientXPCService.xpc/FMIPClientXPCService
/System/Library/PrivateFrameworks/Swift/libswiftDemangle.dylib
/System/Library/PrivateFrameworks/Swift/libswiftXCTest.dylib
/System/Library/PrivateFrameworks/TelephonyUtilities.framework/callservicesd
/System/Library/PrivateFrameworks/TelephonyUtilities.framework/PlugIns/PhoneIntentHandler.appex/PhoneIntentHandler
/System/Library/PrivateFrameworks/UpNextWidget.framework/PlugIns/UpNext.appex/UpNext
/usr/libexec/sharingd
/usr/libexec/SidecarRelay
/usr/libexec/tzd

共享的dyld缓存还包含以下的二进制文件,大多数是Swift的库:

/System/Library/PrivateFrameworks/ConversationKit.framework/ConversationKit
/System/Library/PrivateFrameworks/CoreKnowledge.framework/CoreKnowledge
/System/Library/PrivateFrameworks/FMClient.framework/FMClient
/System/Library/PrivateFrameworks/News/Tea.framework/Tea
/System/Library/PrivateFrameworks/News/TeaActivities.framework/TeaActivities
/System/Library/PrivateFrameworks/News/TeaFoundation.framework/TeaFoundation
/System/Library/PrivateFrameworks/News/TeaSettings.framework/TeaSettings
/System/Library/PrivateFrameworks/News/TeaUI.framework/TeaUI
/System/Library/PrivateFrameworks/Stocks/AppAnalytics.framework/AppAnalytics
/System/Library/PrivateFrameworks/Stocks/NewsArticles.framework/NewsArticles
/System/Library/PrivateFrameworks/Stocks/NewsFeed.framework/NewsFeed
/System/Library/PrivateFrameworks/Stocks/StocksAnalytics.framework/StocksAnalytics
/System/Library/PrivateFrameworks/Stocks/StocksCore.framework/StocksCore
/System/Library/PrivateFrameworks/Stocks/StocksUI.framework/StocksUI
/System/Library/PrivateFrameworks/Stocks/TeaActivities.framework/TeaActivities
/System/Library/PrivateFrameworks/Stocks/TeaCharts.framework/TeaCharts
/System/Library/PrivateFrameworks/Stocks/TeaDB.framework/TeaDB
/System/Library/PrivateFrameworks/Stocks/TeaFoundation.framework/TeaFoundation
/System/Library/PrivateFrameworks/Stocks/TeaSettings.framework/TeaSettings
/System/Library/PrivateFrameworks/Stocks/TeaTemplate.framework/TeaTemplate
/System/Library/PrivateFrameworks/Stocks/TeaUI.framework/TeaUI
/System/Library/PrivateFrameworks/Swift/libswiftAccelerate.dylib
/System/Library/PrivateFrameworks/Swift/libswiftARKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftAssetsLibrary.dylib
/System/Library/PrivateFrameworks/Swift/libswiftAVFoundation.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCallKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCloudKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftContacts.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCore.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreAudio.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreData.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreFoundation.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreGraphics.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreImage.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreLocation.dylib
/System/Library/PrivateFrameworks/Swift/libswiftCoreMedia.dylib
/System/Library/PrivateFrameworks/Swift/libswiftDarwin.dylib
/System/Library/PrivateFrameworks/Swift/libswiftDispatch.dylib
/System/Library/PrivateFrameworks/Swift/libswiftFoundation.dylib
/System/Library/PrivateFrameworks/Swift/libswiftGameplayKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftGLKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftHomeKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftIntents.dylib
/System/Library/PrivateFrameworks/Swift/libswiftMapKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftMediaPlayer.dylib
/System/Library/PrivateFrameworks/Swift/libswiftMetal.dylib
/System/Library/PrivateFrameworks/Swift/libswiftMetalKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftModelIO.dylib
/System/Library/PrivateFrameworks/Swift/libswiftNaturalLanguage.dylib
/System/Library/PrivateFrameworks/Swift/libswiftNetwork.dylib
/System/Library/PrivateFrameworks/Swift/libswiftObjectiveC.dylib
/System/Library/PrivateFrameworks/Swift/libswiftos.dylib
/System/Library/PrivateFrameworks/Swift/libswiftPhotos.dylib
/System/Library/PrivateFrameworks/Swift/libswiftQuartzCore.dylib
/System/Library/PrivateFrameworks/Swift/libswiftSceneKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftsimd.dylib
/System/Library/PrivateFrameworks/Swift/libswiftSpriteKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftSwiftOnoneSupport.dylib
/System/Library/PrivateFrameworks/Swift/libswiftUIKit.dylib
/System/Library/PrivateFrameworks/Swift/libswiftVision.dylib
/System/Library/PrivateFrameworks/Swift/libswiftWatchKit.dylib

为何 iOS 越来越偏爱 Swift?

结论

苹果在iOS 12中添加了一些新功能,预料之中的是,这些应用都会包含一些Swift代码。比如Continuity Camera和Measure应用就是如此。

以前的应用被更新过,一些也包含了更多的Swift代码,如AppStore、Books、Music、News、SharingViewService和Stocks。

可以看到,每次新的iOS发布,苹果都在越来越多的应用中使用Swift,但这些应用的总数依然很有限。下面这张图显示了iOS中使用Swift的二进制文件数目的增长(不含Swift库):

为何 iOS 越来越偏爱 Swift?

原文:https://blog.timac.org/2018/0924-state-of-swift-ios12/

译者:弯月,责编:胡巍巍

推荐阅读:


以上所述就是小编给大家介绍的《为何 iOS 越来越偏爱 Swift?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

R语言实战(第2版)

R语言实战(第2版)

[美] Robert I. Kabacoff / 王小宁、刘撷芯、黄俊文等 / 人民邮电出版社 / 2016-5 / 99.00元

本书注重实用性,是一本全面而细致的R指南,高度概括了该软件和它的强大功能,展示了使用的统计示例,且对于难以用传统方法处理的凌乱、不完整和非正态的数据给出了优雅的处理方法。作者不仅仅探讨统计分析,还阐述了大量探索和展示数据的图形功能。新版做了大量更新和修正,新增了近200页内容,介绍数据挖掘、预测性分析和高级编程。一起来看看 《R语言实战(第2版)》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具