Skip to content
GuidesChecked 20 November 2026

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.

Files by state API
APIFiles
@Published393,216
ObservableObject386,048
@ObservedObject300,032
@EnvironmentObject278,016
@StateObject254,976
ModelContext130,560
@AppStorage114,688
@Bindable98,304
@Query49,536
@ObservationIgnored46,336

Previews and tests

XCTest still leads Swift Testing, 2.1 to 1.

Files by preview and test API
APIFiles
import XCTest1,284,096
XCTAssertEqual721,920
import Testing608,624
#Preview599,040
#expect598,016
@Suite388,096
PreviewProvider373,248

Concurrency

@MainActor is in 2.3 times more files than the old call.

Files by concurrency API
APIFiles
Sendable1,335,296
@MainActor1,282,048
@escaping952,320
DispatchQueue.main.async568,320
.sink114,432
DispatchQueue.global110,208
withCheckedContinuation99,072
Task.detached95,360
AsyncStream58,880
async let43,712
PassthroughSubject37,568
final actor2,788

UIKit

UIKit outlets are still in 529,408 files.

@IBOutlet is in 9 times as many files as UIViewRepresentable.

Files by UIKit API
APIFiles
@IBOutlet529,408
@IBAction290,304
UITableViewDelegate128,512
UIViewRepresentable58,624
NSViewRepresentable53,184
UIHostingController35,648
CompositionalLayout11,056

Availability

iOS 13 is the version checks name most.

Files by availability check
CheckFiles
iOS 1121,888
iOS 124,800
iOS 1355,296
iOS 1423,712
iOS 1532,320
iOS 1633,600
iOS 1726,816
iOS 1814,080
iOS 2626,496
iOS 274,952

Localization

Strings files outnumber String Catalogs, 6.5 to 1.

Files by localization API
APIFiles
Localizable.strings files133,376
String(localized:124,416
NSLocalizedString88,832
LocalizedStringKey47,872
LocalizedStringResource30,656
String Catalog files20,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.

Files of newer API per older one
PairNew per old
Navigation1.8
Previews1.6
Main thread2.3
Localized strings1.4
Testing0.5
String Catalogs0.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.

The five rarest APIs
APIFiles
final actor2,788
available iOS 124,800
available iOS 274,952
CompositionalLayout11,056
available iOS 1814,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.

The ten most common APIs
RankAPIFiles
1Sendable1,335,296
2import XCTest1,284,096
3@MainActor1,282,048
4@escaping952,320
5XCTAssertEqual721,920
6import Testing608,624
7#Preview599,040
8#expect598,016
9DispatchQueue.main.async568,320
10@IBOutlet529,408

Groups

Concurrency has the most file hits, 4.7 million.

File hits by group
GroupAPIsFiles
Concurrency124,700,004
Previews and tests74,573,040
SwiftUI state102,051,712
UIKit and storyboards71,106,736
SwiftUI navigation4542,432
Localization6445,824
Availability check10243,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.

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.