Attention developers! The usage of Swift and SwiftUI in iOS 14

2020/10/1402:28:09 technology 481

Attention developers! The usage of Swift and SwiftUI in iOS 14 - DayDayNews

author | Alexandre Colucci

translator | meniscus, editor in charge | Yang Biyu

head picture | CSDN download from Oriental IC

produced | CSDN (ID: CSDNnews)

The following is the translation:

at the 2014 Global Developers Conference, Apple launched Swift. Over the years, I have been analyzing iOS and counting how many built-in applications are using Swift. IOS 9 released in 2015 includes an application written in Swift: calculator. Since then, there have been more and more applications written in Swift in each iOS version release: iOS 10.1, iOS 11.1, iOS12.0 and finally iOS 13.1.

Today, Apple has launched iOS 14. Let's take a look at how much more applications have been written in Swift since iOS 13. A year ago, at the 2019 Global Developers Conference, Apple launched SwiftUI. In this article, I will also try to evaluate which built-in applications are using this latest UI framework.

Swift usage in iOS 14

iOS14.0 contains 351 binary files and frameworks written in Swift. Please note that these binary files of may only contain one line of Swift code, and may not be written entirely in Swift. This list is compiled based on iOS 14.0 (18A373) for iPhone 11 Pro Max:

detects the binary file

using SwiftUI. SwiftUI released at the 2019 Global Developers Conference is a brand new framework that can use Swift. Build the user interface. In this way, the binary file generated using SwiftUI will use Swift. Can we list all applications that use SwiftUI?

I once developed a widget Clatters 3.0 for iOS 14. I noticed that these widgets are linked to

/System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI.

only needs to be adjusted slightly, and the script for detecting Swift can be converted to detecting SwiftUI:

SwiftUI usage in iOS13.7

So far, I have not released a list of SwiftUI apps in iOS. For reference, I created the following iOS 13.7 list. Not surprisingly, iOS 13.7 contains only a few binary files that rely on SwiftUI:

iOS14.0 SwiftUI usage

iOS14.0 contains more SwiftUI binary files. The main reason is undoubtedly the launch of WidgetKit, which is the first public SwiftUI dedicated framework. Every widget in iOS 14 appears in this list. Another shiny new feature of iOS 14 is the Translate app , which also seems to be built with SwiftUI.

Summary

The new features in iOS14 are all built with Swift code, which is not surprising. One of the most obvious features of iOS 14 is the addition of many widgets to on the home screen. And these widgets are built using SwiftUI's first and only framework WidgetKit. This explains why the adoption of SwiftUI has grown so fast this year. Another important new feature of iOS 14 is the Translate app, which also seems to use Swifbuilt by tUI.

In addition to the Swift library, iOS 14.0 contains a total of 291 binary files that use Swift, which is twice the number of iOS13. It is also worth noting that SwiftUI has been quickly adopted by 43 binaries in iOS 14.

Attention developers! The usage of Swift and SwiftUI in iOS 14 - DayDayNews

Original: https://blog.timac.org/2020/0927-state-of-swift-ios14/

This article is a CSDN translation, please indicate the source of reprint.

technology Category Latest News