为何 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?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

数据结构与算法分析

数据结构与算法分析

韦斯(Mark Allen Weiss) / 机械工业出版社 / 2010-8 / 45.00元

《数据结构与算法分析:C语言描述》曾被评为20世纪顶尖的30部计算机著作之一,作者在数据结构和算法分析方面卓有建树,他的数据结构和算法分析的著作尤其畅销,并受到广泛好评,已被世界500余所大学选作教材。 在《数据结构与算法分析:C语言描述》中,作者精炼并强化了他对算法和数据结构方面创新的处理方法。通过C程序的实现,着重阐述了抽象数据类型的概念,并对算法的效率、性能和运行时间进行了分析。 ......一起来看看 《数据结构与算法分析》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

随机密码生成器
随机密码生成器

多种字符组合密码