NavigationStack, Observable and Swift Testing
NavigationStack leads 56 Swift APIs counted in public GitHub files on 1 November 2026.
Free for one project and 100 votes. Paid plans start with a 14 day trial, no card.
State
ObservableObject is still the common state type.
| API | Files |
|---|---|
| @Published | 393,216 |
| ObservableObject | 386,048 |
| @ObservedObject | 300,032 |
| @EnvironmentObject | 278,016 |
| @StateObject | 254,976 |
| ModelContext | 130,560 |
| @AppStorage | 114,688 |
| @Bindable | 98,304 |
| @Query | 49,536 |
| @ObservationIgnored | 46,336 |
Previews and tests
XCTest still leads Swift Testing, 2.1 to 1.
| API | Files |
|---|---|
| import XCTest | 1,284,096 |
| XCTAssertEqual | 721,920 |
| import Testing | 608,624 |
| #Preview | 599,040 |
| #expect | 598,016 |
| @Suite | 388,096 |
| PreviewProvider | 373,248 |
Concurrency
@MainActor is in 2.3 times more files than the old call.
| API | Files |
|---|---|
| Sendable | 1,335,296 |
| @MainActor | 1,282,048 |
| @escaping | 952,320 |
| DispatchQueue.main.async | 568,320 |
| .sink | 114,432 |
| DispatchQueue.global | 110,208 |
| withCheckedContinuation | 99,072 |
| Task.detached | 95,360 |
| AsyncStream | 58,880 |
| async let | 43,712 |
| PassthroughSubject | 37,568 |
| final actor | 2,788 |
UIKit
UIKit outlets are still in 529,408 files.
@IBOutlet is in 9 times as many files as UIViewRepresentable.
| API | Files |
|---|---|
| @IBOutlet | 529,408 |
| @IBAction | 290,304 |
| UITableViewDelegate | 128,512 |
| UIViewRepresentable | 58,624 |
| NSViewRepresentable | 53,184 |
| UIHostingController | 35,648 |
| CompositionalLayout | 11,056 |
Availability
iOS 13 is the version checks name most.
| Check | Files |
|---|---|
| iOS 11 | 21,888 |
| iOS 12 | 4,800 |
| iOS 13 | 55,296 |
| iOS 14 | 23,712 |
| iOS 15 | 32,320 |
| iOS 16 | 33,600 |
| iOS 17 | 26,816 |
| iOS 18 | 14,080 |
| iOS 26 | 26,496 |
| iOS 27 | 4,952 |
Localization
Strings files outnumber String Catalogs, 6.5 to 1.
| API | Files |
|---|---|
| Localizable.strings files | 133,376 |
| String(localized: | 124,416 |
| NSLocalizedString | 88,832 |
| LocalizedStringKey | 47,872 |
| LocalizedStringResource | 30,656 |
| String Catalog files | 20,672 |
New against old
Navigation, previews, the main thread and localized strings lead with the newer API. Testing and String Catalogs do not.
The newer API leads in four of six pairs.
Each ratio is the files of the newer API divided by the files of the older one.
| Pair | New per old |
|---|---|
| Navigation | 1.8 |
| Previews | 1.6 |
| Main thread | 2.3 |
| Localized strings | 1.4 |
| Testing | 0.5 |
| String Catalogs | 0.2 |
Rarest
The five rarest are final actor, the iOS 12 and iOS 27 checks, CompositionalLayout and the iOS 18 check.
final actor is the rarest API, in 2,788 files.
The most common, Sendable, is in 479 times as many files as final actor.
| API | Files |
|---|---|
| final actor | 2,788 |
| available iOS 12 | 4,800 |
| available iOS 27 | 4,952 |
| CompositionalLayout | 11,056 |
| available iOS 18 | 14,080 |
Top ten
Sendable, import XCTest and @MainActor are the three most common, each in more than 1.2 million files.
Sendable is the most common API in the file.
The ten most common add up to more than half of the 13,663,708 file hits in the file.
| Rank | API | Files |
|---|---|---|
| 1 | Sendable | 1,335,296 |
| 2 | import XCTest | 1,284,096 |
| 3 | @MainActor | 1,282,048 |
| 4 | @escaping | 952,320 |
| 5 | XCTAssertEqual | 721,920 |
| 6 | import Testing | 608,624 |
| 7 | #Preview | 599,040 |
| 8 | #expect | 598,016 |
| 9 | DispatchQueue.main.async | 568,320 |
| 10 | @IBOutlet | 529,408 |
Groups
Concurrency has the most file hits, 4.7 million.
| Group | APIs | Files |
|---|---|---|
| Concurrency | 12 | 4,700,004 |
| Previews and tests | 7 | 4,573,040 |
| SwiftUI state | 10 | 2,051,712 |
| UIKit and storyboards | 7 | 1,106,736 |
| SwiftUI navigation | 4 | 542,432 |
| Localization | 6 | 445,824 |
| Availability check | 10 | 243,960 |
What is in the file
A number for each pair
NavigationStack against NavigationView, Swift Testing against XCTest, and more.
Every row in one file
56 APIs, each with its group, its count and the search used.
No code and no names
The file holds counts only, with no repository and no developer.
How the files were counted
One search per API, counts only.
Write one search per API
Each of 56 searches names the API and the Swift language.
Ask the code search
One request per search to the public code search, at least seven seconds apart.
Ask again on a partial answer
When a result came back flagged as partial, the search ran again, up to three times.
Keep the count
Only the count was kept, in the CSV, with the search that made it.
Which APIs a board screen should use
A board screen written today fits the code that leads in new projects. NavigationStack is in 317,440 files against 176,896 for NavigationView, and #Preview is in 599,040 against 373,248 for PreviewProvider, so the newer forms are the ones most readers meet.
UIKit has not gone. UIHostingController is in 35,648 files and @IBOutlet in 529,408, so a board offered as a SwiftUI view with a hosting wrapper reaches the apps that still build screens in UIKit.
What these numbers leave out
- These are files, not apps or downloads.
- A large count is rounded by the search, so two numbers within about 10 percent are level.
- There is no date filter, so every year counts and an older API has had longer to collect files.
- The search matches words and not lines, so a word in a comment or a string counts too.
- A copied sample counts each time it was copied.
- The Observable macro has no row, because the same word names a type in a reactive library, so Bindable and ObservationIgnored stand in for it.
What people ask about Swift API use
Is NavigationStack more common than NavigationView?
Yes, 317,440 files against 176,896, which is 64.2 of every 100 files that use either.
Is Swift Testing more common than XCTest?
Not yet. import XCTest is in 1,284,096 files and import Testing in 608,624.
How many files still use ObservableObject?
386,048 files, against 98,304 for @Bindable, which belongs to the newer Observation macro.
Which iOS version do availability checks name most?
iOS 13, in 55,296 files, then iOS 16 and iOS 15.
Are String Catalogs common?
Not yet. 20,672 files against 133,376 for Localizable.strings.
Does the file include code?
No. It holds the API, the group, the file count and the search.
May a site quote these figures?
Yes. Link this page, give 1 November 2026 as the read date, and use any row of the CSV.
More Swift code, counted
More counts for Swift and iOS developers.
How much Swift code uses concurrency, GCD and Combine?
Minimum iOS versions in 85,504 new Xcode projects
Xcode release history: dates, Swift and macOS needed
SwiftUI vs UIKit and 22 more Apple frameworks, counted
StoreKit 2 vs StoreKit 1 in public Swift files
Apple privacy manifest reason codes counted on GitHub
Swift Evolution proposals: how many are accepted
Widgets, Live Activities and App Intents in Swift files
Show 9 more
Xcode beta schedule: every beta date since 2015
SwiftUI views and modifiers counted in public Swift files
VoiceOver, Dynamic Type and dark mode counted in Swift apps
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
Swift Package.swift settings counted: exact and unsafeFlags
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.