Skip to content
GuidesChecked 21 November 2026

Swift code statistics: SwiftUI in 3,190,784 files

Forty numbers from Swift code, packages and Xcode releases with each count sourced.

Free for one project and 100 votes. Paid plans start with a 14 day trial, no card.

Screens

Eight numbers on frameworks, new calls and the views that code reaches for most.

SwiftUI is in 3,190,784 files and UIKit in 2,879,488, and withAnimation leads the views.

SwiftUI and UIKit are level, and the newer calls still trail the old ones.

Frameworks and views
StatisticNumber
Files importing SwiftUI3,190,784
SwiftData over Core Data1.4 to 1
Files importing Foundation5,808,128
NavigationStack share64.2 in 100
Swift Testing share32.2 in 100
Files with @MainActor1,282,048
Files with withAnimation308,736
Files with NavigationLink223,488

Concurrency

Eight numbers on concurrency words, older callbacks and the names of app layers.

nonisolated is in 365,056 files, and ViewModel in 903,168 against 349,696 for Repository.

The new concurrency words lead, and the old dispatch calls are far from gone.

Concurrency and layers
StatisticNumber
Files with nonisolated365,056
Files with Task.sleep355,840
Files with asyncAfter268,800
Completion handler files243,968
Combine over Rx bag1.7 to 1
ViewModel files903,168
Repository files349,696
Reducer files60,416

Data and tests

Eight numbers on storage, JSON, logging and test words in public files.

FileManager.default is in 696,320 files, and XCTestCase in 1,222,656.

Plain file storage and the older test case still lead.

Storage, JSON and tests
StatisticNumber
FileManager.default files696,320
UserDefaults.standard files310,784
ModelContainer files85,760
JSONDecoder() files531,456
JSONSerialization files358,789
XCTestCase files1,222,656
Logger files96,128
MetricKit import files1,038

Packages

Eight numbers on stars, licenses, upkeep and builds across public Swift packages.

80.5 in 100 packages use MIT or Apache-2.0, and 16.8 in 100 reach 100 stars.

Most packages are small, and a few hold nearly all the stars.

Stars, licenses and builds
StatisticNumber
Packages on the list12,422
Median package stars6 stars
Packages with 100 stars16.8 in 100
Archived packages5.4 in 100
Pushed in 12 months52.2 in 100
MIT or Apache-2.080.5 in 100
No license or unmatched14.3 in 100
Packages building on iOS86.2 in 100

Language and tools

Eight numbers on language modes, proposals, Xcode releases and minimum versions.

91.5 in 100 project files set Swift 5, and 64.0 in 100 new ones target iOS 18.

Projects move to new targets faster than to a new language mode.

Modes, releases and targets
StatisticNumber
Swift 5 language mode91.5 in 100
Swift 6 in format 776.9 in 100
Proposals implemented82.1 in 100
Swift 3.0 proposals89
Majors shipped in September12 of 12
Median gap, Swift to Xcode179 days
New files targeting iOS 1864.0 in 100
Package floor of iOS 1522.7 in 100

What is in the file

Forty numbers in one file

One row each: the number, its unit and the guide that holds the count.

Five groups

Screens, concurrency, data and tests, packages, and language and tools.

No package names

The file holds counts, so it names no package, author or app.

A way to cite it

Use any figure or the whole file, and credit this page and the read date.

Where the numbers come from

Four steps.

Search the code

Public Swift files were searched for each framework, call and attribute named in a guide.

Read the packages

Public Swift packages were read for stars, licenses, platforms and settings.

Count in the guides

Each guide counted one family of words or settings, with its own sample and read date.

Collect the headlines

The forty headline figures were lifted from the guides and checked against each page.

What a new package joins

A package that draws a board joins projects where NavigationStack is in 64.2 of every 100 files that use it or NavigationView, and where view models are in 903,168 files. Offering the board as a view and its state as a separate model lets an app place it inside its own screen.

Tests are still mostly XCTest, with Swift Testing in 32.2 of every 100 files that use either. Among 12,422 packages on the list, 52.2 in 100 had a push in the last 12 months and the median has 6 stars, so a package that ships regular releases stands out.

What these numbers leave out

  • The code counts come from public files that a code search returned, so private code is not in them.
  • A code search count is rounded, so a gap of a few percent between two words can be noise.
  • The package numbers come from public lists, and the sample is smaller for the build checks.
  • A word in a file shows that it is used, and it does not show how much or how well.
  • Any figure here is only as firm as the guide it was lifted from.
  • Code and packages change every day, so each guide gives its own read date.
  • The page names no package or author, so each number is tied to a group of files or packages.

What people ask about launch numbers

Is SwiftUI used more than UIKit?

SwiftUI is imported by 3,190,784 public files and UIKit by 2,879,488, so SwiftUI leads by 1.1 to 1.

Is SwiftData replacing Core Data?

Not yet. SwiftData is imported in 244,736 files against 172,032 for Core Data, which is 1.4 to 1.

How much Swift code uses Swift Testing?

Swift Testing has 32.2 of 100 files that import either test library.

Do files still use dispatch queues?

Yes. asyncAfter is in 268,800 files, against 355,840 for Task.sleep.

How common is the ViewModel name?

It is in 903,168 public files, 2.6 times as many as Repository.

Which license do Swift packages use?

MIT and Apache-2.0 together cover 80.5 in 100 packages.

How many Swift packages get 100 stars?

16.8 in 100, and the median package has 6 stars.

Which Swift version do projects set?

Swift 5 is set in 91.5 in 100 project files, and Swift 6 in 6.9 in 100 of the newer format.

Which iOS version do new projects target?

iOS 18 is set in 64.0 in 100 new project files, and iOS 26 in 28.3.

May a page quote these figures?

Yes, with this page named and the read date. The 40 rows of swift-code-statistics-2026-10.csv hold every figure behind it.

Readers who tell you what to build

Your first board is free, with one project and 100 votes. The 14 day trial of Lite or Pro needs no card.