SwiftUI vs UIKit and 22 Apple frameworks, counted
24 Apple frameworks counted in public Swift files on 1 November 2026. SwiftUI leads at 3,190,784 files.
Free for one project and 100 votes. Paid plans start with a 14 day trial, no card.
UI frameworks
SwiftUI is ahead, and AppKit is under a fifth of UIKit.
UIKit has 5.4 times the files of AppKit.
| Module | Files |
|---|---|
| SwiftUI | 3,190,784 |
| UIKit | 2,879,488 |
| AppKit | 530,432 |
| WebKit | 76,416 |
| WidgetKit | 49,920 |
| Charts | 31,680 |
| AppIntents | 24,576 |
| ActivityKit | 16,256 |
| TipKit | 4,368 |
Data and state
The newer data framework leads Core Data, 1.4 to 1.
| Module | Files |
|---|---|
| Foundation | 5,808,128 |
| Combine | 338,944 |
| SwiftData | 244,736 |
| CoreData | 172,032 |
| Observation | 100,864 |
| UserNotifications | 67,456 |
| CloudKit | 15,104 |
Other frameworks
AVFoundation is far ahead of the other frameworks.
| Module | Files |
|---|---|
| AVFoundation | 189,184 |
| MapKit | 74,368 |
| Vision | 34,176 |
| HealthKit | 24,992 |
| StoreKit | 24,544 |
| ARKit | 20,576 |
| CoreML | 19,520 |
| FoundationModels | 12,320 |
Foundation
Foundation is in 5,808,128 files, 1.8 times the files of SwiftUI.
SwiftUI is in 54.9 of every 100 Foundation files.
UIKit is in 49.6 of every 100 files that import Foundation.
| Module | Per 100 Foundation files |
|---|---|
| SwiftUI | 54.9 |
| UIKit | 49.6 |
| AppKit | 9.1 |
| Combine | 5.8 |
| SwiftData | 4.2 |
| AVFoundation | 3.3 |
| CoreData | 3.0 |
| Observation | 1.7 |
New against old
SwiftUI leads UIKit at 1.1 and SwiftData leads Core Data at 1.4. Observation trails Combine at 0.3.
SwiftUI and SwiftData lead their older pairs.
WidgetKit is in 3.1 times the files of ActivityKit, and AppKit is at 0.2 of UIKit.
| Pair | Ratio |
|---|---|
| SwiftUI per UIKit | 1.1 |
| SwiftData per Core Data | 1.4 |
| WidgetKit per ActivityKit | 3.1 |
| Observation per Combine | 0.3 |
| AppKit per UIKit | 0.2 |
SwiftUI add ons
Five add on frameworks are in far fewer files than SwiftUI: WidgetKit, Charts, AppIntents, ActivityKit and TipKit.
WidgetKit is in 15.6 files for every 1,000 SwiftUI files.
Each figure is the files of the add on per 1,000 files that import SwiftUI. It compares two counts and does not say the same files import both.
| Add on | Per 1,000 SwiftUI files |
|---|---|
| WidgetKit | 15.6 |
| Charts | 9.9 |
| AppIntents | 7.7 |
| ActivityKit | 5.1 |
| TipKit | 1.4 |
Machine learning
Vision is in 1.8 times the files of CoreML.
FoundationModels is in 0.6 of the files of CoreML.
| Module | Files |
|---|---|
| Vision | 34,176 |
| CoreML | 19,520 |
| FoundationModels | 12,320 |
Rarest
The five rarest are TipKit, FoundationModels, CloudKit, ActivityKit and CoreML.
TipKit is the rarest module, in 4,368 files.
Foundation is in 1,330 times as many files as TipKit.
| Module | Files |
|---|---|
| TipKit | 4,368 |
| FoundationModels | 12,320 |
| CloudKit | 15,104 |
| ActivityKit | 16,256 |
| CoreML | 19,520 |
Top ten
Foundation, SwiftUI and UIKit are the three most imported, each in more than 2.8 million files.
Foundation, SwiftUI and UIKit lead the ten.
| Rank | Module | Files |
|---|---|---|
| 1 | Foundation | 5,808,128 |
| 2 | SwiftUI | 3,190,784 |
| 3 | UIKit | 2,879,488 |
| 4 | AppKit | 530,432 |
| 5 | Combine | 338,944 |
| 6 | SwiftData | 244,736 |
| 7 | AVFoundation | 189,184 |
| 8 | CoreData | 172,032 |
| 9 | Observation | 100,864 |
| 10 | WebKit | 76,416 |
Groups
UI and data modules are level, at 6.8 and 6.7 million.
| Group | Modules | Files |
|---|---|---|
| Apple UI | 9 | 6,803,920 |
| Apple data and state | 7 | 6,747,264 |
| Apple frameworks | 8 | 399,680 |
What is in the file
A number for each framework
SwiftUI against UIKit, SwiftData against Core Data, and 20 more.
Every row in one file
24 modules, each with its group and its count of files.
No code and no names
The file holds counts only, with no repository and no developer.
How the files were counted
One search per module, counts only.
Write one search per module
Each search is the word import followed by the module name, restricted to Swift.
Ask the code search
One request per module, at least seven seconds apart.
Ask again on a partial answer
When the service marked a search incomplete, it was run again up to three times.
Keep the count
Only the count went into the CSV, with the module and its group.
What a package has to import
A package that draws a feedback board has to meet apps where they are, and the counts say that is both UIKit and SwiftUI. UIKit is in 2,879,488 files and SwiftUI in 3,190,784, so neither can be skipped. Foundation sits in 5,808,128 files, which makes it the safe base for networking and storage, and AppKit, in 530,432 files, is the smaller but real audience on the Mac.
Every import beyond those costs reach. WebKit is in 76,416 files and UserNotifications in 67,456, so a board shown in a web view or a push prompt for a shipped request fits a minority of the code counted here. A package that asks only for Foundation and one of the two interface frameworks works in the widest set of projects.
What these numbers leave out
- These are files, not apps or developers.
- A large count is rounded by the search, so two modules within about 10 percent of each other are level.
- There is no date filter, so a count holds every year since the module existed.
- A vendored copy or a tutorial template counts again in each file.
- The search leaves out most forks, and an import in a comment or a string counts too.
- A module imported under a name that was not searched is missing, and no code was read.
What people ask about Swift imports
Is SwiftUI imported more than UIKit?
Yes, in 3,190,784 files against 2,879,488, a ratio of 1.1 to 1.
Is SwiftData more common than Core Data?
Yes, in 244,736 files against 172,032, a ratio of 1.4 to 1.
How many files import Foundation?
5,808,128, the most of the 24 modules in the file.
Which Apple framework is imported most after the UI ones?
AVFoundation, in 189,184 files, then MapKit in 74,368.
How many files import FoundationModels?
12,320 files, as read on 1 November 2026.
Does the file include code?
No. It holds the module, the group and the number of files.
May a site quote these figures?
Yes. Credit this page and the read date, 1 November 2026, and take any module row from the CSV.
More Swift code, counted
More counts for Swift and iOS developers.
NavigationStack, Observable and Swift Testing in GitHub
Xcode release history: dates, Swift and macOS needed
StoreKit 2 vs StoreKit 1 in public Swift files
MIT, Apache-2.0 or no license: Swift packages counted
Swift Evolution proposals: how many are accepted
Swift packages in 2026: stars, pushes and setup counted
iOS permission keys and entitlements counted on GitHub
Widgets, Live Activities and App Intents in Swift files
Show 10 more
SwiftUI views and modifiers counted in public Swift files
VoiceOver, Dynamic Type and dark mode counted in Swift apps
Apple platform checks counted in public Swift files
SwiftData, Core Data and CloudKit counted in Swift files
How Swift apps log, crash and test, counted in public files
Foundation Models, Core ML and Vision counted in Swift apps
Sign in, Face ID and push counted in Swift apps
Mac menu bar, login item and system access code counted
URLSession, Codable and Network counted in Swift files
ViewModel, Coordinator and Reducer counted in Swift files
Collect feature requests in an iOS app
Your first board is free, with one project and 100 votes. The 14 day trial of Lite or Pro needs no card.