Skip to content
CAI
Software that uses CAICheck a score

danielsaidi/SwiftUIKit

58.4

Adequate · 1 October 2026

4.3k

lines of production code

Swift

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

SwiftUIKit is a cross-platform Swift library that provides a comprehensive suite of utilities for building SwiftUI applications on Apple platforms. It offers reusable UI components, such as cards and lists, alongside extensive helper extensions for data handling, string manipulation, date operations, and secure storage. The system also includes infrastructure for file management, image caching, and device identification, supported by automation scripts for package maintenance and documentation.

How it got here

2020–2022 — SwiftUI utility library expansion

9 changes.

This period focused on establishing the SwiftUIKit library's structure and populating it with a comprehensive suite of SwiftUI view extensions, components, and utility modules. Key additions included the ShareSheet, EditableView, and FetchedDataView components, alongside robust helpers for colors, images, and styling. The work also involved implementing initial test coverage to support these new features.

2023 — SwiftUIKit utility expansion

16 changes.

This period focused on expanding the SwiftUIKit library with a broad range of new utility modules, including text input enhancements, data persistence helpers, and file management tools. Significant additions included secure keychain storage, device identification, and comprehensive string and date extensions, all accompanied by extensive unit test coverage to ensure reliability.

2024–2026 — SwiftUI component and infrastructure expansion

6 changes.

This period focused on expanding the SwiftUIKit library with new UI components, including GridItem convenience initializers, a Card view with button styling, and a unified Labelable protocol. It also established foundational infrastructure for localization, favorites management, and automated release workflows through a new suite of development scripts.

Features

Add EditableView protocol and FetchedDataView component

Introduces the EditableView protocol for views that need to toggle edit mode, providing convenience properties like isEditing and setIsEditing. Additionally, adds the FetchedDataView struct to simplify presenting async data by conditionally rendering content, loading, or no-data states based on the data availability and loading status.

Sources/SwiftUIKit/Views · high confidence

Add Labelable protocol for unified SwiftUI label creation

Introduces the \Labelable\ protocol, allowing developers to define a consistent \labelTitle\ and \labelIcon\ on custom types. This enables the creation of \Label\, \Button\, and \NavigationLink\ components directly from these values using new \init(for:)\ initializers, simplifying the construction of consistent UI elements across the app.

Sources/SwiftUIKit/Label · high confidence

Add ReorderableForEach and SidebarListRowBackground modifiers

Users can now reorder items in lists by dragging them using the new ReorderableForEach view, which supports custom drag previews and requires a container modifier for proper drop handling. Additionally, a new sidebarListRowBackground modifier is available for iOS, allowing list row backgrounds to be applied specifically in compact-size sidebar contexts without affecting regular-sized interfaces.

Sources/SwiftUIKit/Lists · high confidence

Add ShareSheet component for presenting system share sheets

A new \ShareSheet\ SwiftUI view has been added to the SwiftUIKit library, allowing users to present the native iOS share sheet (\UIActivityViewController\) directly from SwiftUI. This component accepts activity items, optional application activities, excluded activity types, and a completion callback, wrapping the UIKit controller in a \UIViewControllerRepresentable\ for seamless integration in iOS apps.

Sources/SwiftUIKit/Sharing · high confidence

Add favorites management infrastructure

Introduces a new \Favorites\ module providing a \FavoriteStore\ protocol and a \UserDefaultsFavoriteStore\ implementation to persist favorite item IDs, along with a \FavoriteContext\ class that manages favorite state and exposes a \showOnlyFavorites\ filter for SwiftUI views.

Sources/SwiftUIKit/Favorites · high confidence

Add localized strings resource file

A new Localizable.xcstrings file has been added to the resources, providing the initial set of localized strings for the application, including placeholders and the 'Settings' label.

Sources/SwiftUIKit/Resources · high confidence

Add macOS About Panel command

Users can now open the macOS standard About Panel directly from the menu bar via a new \AboutPanelCommand\. This command replaces the default app info section and allows customization of the menu title, application name, and additional credits text.

Sources/SwiftUIKit/Commands · high confidence

Add regex-based string validation helper

A new \ValidationRegex\ struct and \String.isValid(\_:)\ extension have been added to the library, allowing users to easily validate strings against regular expressions (such as email formats) using \NSPredicate\.

Sources/SwiftUIKit/Regex · high confidence

Add secure keychain storage utilities

The \Sources/SwiftUIKit/Keychain\ module now provides a new set of utilities for securely storing data on the device. This includes a \KeychainWrapper\ class that simplifies reading and writing primitive types (strings, numbers, booleans, data) and \NSCoding\ objects to the iOS Keychain, along with a \KeychainService\ singleton for convenient access. The module also introduces \KeychainItemAccessibility\ to control when stored items can be accessed (e.g., only when unlocked, after first unlock) and supports service names and access groups for shared keychain access between applications.

Sources/SwiftUIKit/Keychain · high confidence

Added persistent device identifier utility

Introduced a new \DeviceIdentifier\ class that generates and persists a unique device identifier across app reinstalls by storing the value in both the iOS Keychain and UserDefaults. This allows applications to reliably track device identity even after the app is uninstalled and reinstalled, with support for custom keychain services and accessibility settings.

Sources/SwiftUIKit/Device · high confidence

Convenience initializers for GridItem and GridItem arrays

Users can now create GridItem instances and arrays of GridItems using simplified static factory methods (adaptive, fixed, flexible) directly on the types, reducing boilerplate when configuring grid layouts in SwiftUI.

Sources/SwiftUIKit/Grid · high confidence

Introduce Card view and CardButtonStyle for consistent card UI

SwiftUIKit now includes a new Card view component that wraps content with configurable corner radius, shadow, and optional context menus, along with a CardButtonStyle that applies press animations and scaling effects to buttons. These additions provide a unified way to create floating list or grid cards with consistent styling across iOS, macOS, and tvOS platforms.

Sources/SwiftUIKit/Cards · high confidence

Introduce ViewShadowStyle for typed shadow configurations

A new ViewShadowStyle struct has been added to provide strongly-typed shadow presets (none, badge, elevated, sticker) and a corresponding view modifier. This allows users to apply consistent, predefined shadow effects to views more easily than configuring raw shadow parameters, with a preview demonstrating the different styles including an animated elevation toggle on iOS.

Sources/SwiftUIKit/Styles · high confidence

Introduces a comprehensive suite of Swift package automation scripts

The repository now includes a new \scripts/\ directory containing a set of Bash utilities to streamline Swift package development and release workflows. These scripts provide automated capabilities for building and testing targets across multiple Apple platforms (iOS, macOS, tvOS, watchOS, and xrOS), generating DocC documentation with static hosting support, and managing localization code generation from string catalogs. Additionally, the suite includes tools for validating git states and package integrity prior to release, bumping versions, and synchronizing the script set across different projects.

scripts · high confidence

New color utilities: hex parsing, serialization, and random generation

The Colors module now includes several new capabilities for working with SwiftUI colors. You can create colors from hex strings (e.g., "\#abcdef") or integer values (e.g., 0xabcdef) using the new \Color(hex:)\ initializers and static methods, which support optional alpha values. Colors can now be encoded and decoded for storage or transmission via the new \Codable\ conformance, though note that dynamic system colors (like those respecting dark mode) will be serialized as static RGB values. Additionally, you can generate random colors with customizable RGB ranges and optional opacity randomization, and retrieve standard list background colors tailored to light or dark schemes.

Sources/SwiftUIKit/Colors · high confidence

New data utilities and storage helpers added to SwiftUIKit

This update introduces several new capabilities to the library. Users can now parse CSV files using the new CsvParser class, which supports parsing from bundles or URLs with configurable separators. The Bundle extension now provides convenient properties to retrieve the app's build number, display name, and version number. For data persistence, StorageValue (aliased as AppStorageValue and SceneStorageValue) allows any Codable type to be stored in SwiftUI's AppStorage and SceneStorage via JSON encoding, while Array and Dictionary extensions enable storing collections of Codable items directly. Additionally, the MimeType enum provides a comprehensive list of MIME types for files, and a preview inspector helps detect when code is running in SwiftUI previews.

Sources/SwiftUIKit/Data · high confidence

New date utility extensions for SwiftUIKit

This change introduces a new set of convenience extensions for the Foundation \Date\ type within the \Sources/SwiftUIKit/Date\ module. Users can now easily add or remove time intervals (days, hours, minutes, seconds) using \adding\ and \removing\ methods, perform readable comparisons with \isAfter\, \isBefore\, and \isSame\, extract specific calendar components (day, hour, minute, month, second, year), calculate differences between dates in various units, and initialize dates from specific components via a new initializer.

Sources/SwiftUIKit/Date · high confidence

New file management and iCloud synchronization utilities

Added a suite of new utilities in the Files module to simplify local file operations and iCloud integration. This includes BundleFileFinder for locating files within app bundles, DirectoryFileManager for creating, reading, and removing files in local directories, and DirectoryMonitor/DirectoryObservable for tracking file system changes. Additionally, new iCloud capabilities were introduced via URL extensions for ubiquity container paths and the iCloudDocumentSync class, which handles automatic downloading of documents from iCloud based on file patterns.

Sources/SwiftUIKit/Files · high confidence

New image manipulation utilities and caching

This update introduces a suite of new image utilities within the SwiftUIKit Images module. It adds an \ImageCache\ class for storing and retrieving images by key, and extends \Image\ with a \resized(to:)\ modifier for SwiftUI views. Platform-specific extensions are added for \UIImage\ (iOS) and \ImageRepresentable\ (macOS/iOS), enabling image rotation, tinting, resizing (by width, height, or max dimensions), and conversion to compressed JPEG data. Additionally, a convenience method allows saving images directly to the user's photo album on iOS.

Sources/SwiftUIKit/Images · high confidence

New string utility extensions for encoding, parsing, and manipulation

The SwiftUIKit library adds a comprehensive set of new extensions to the \String\ type to simplify common text operations. Users can now easily encode strings for URLs and form data (\urlEncoded\, \formEncoded\), decode Base64 content, and parse boolean values from strings. Additional utilities include case-insensitive containment checks, flexible splitting by multiple separators, targeted string replacement with options, and trimming. The update also introduces helpers for capitalizing the first letter, cleaning up dictation artifacts, checking for content presence, and convenient subscript access for individual characters and ranges.

Sources/SwiftUIKit/String · high confidence

New text input utilities: multiline submit, clear buttons, and editor styles

This update introduces three new capabilities for text input in SwiftUI. First, the \onMultilineSubmit\ modifier allows multi-line text fields to trigger a custom action when the primary key (e.g., Return) is pressed, automatically handling focus loss and newline removal. Second, the \withClearButton\ modifier adds a trailing clear button to single-line text fields, providing an easy way to reset the text binding. Third, the \TextEditorStyle\ enum and associated modifier enable consistent styling for text editors, supporting plain, rounded border, and custom color border appearances.

Sources/SwiftUIKit/Text · high confidence

New utility extensions for SwiftUI views and Swift collections

SwiftUIKit adds a broad set of convenience extensions to simplify common UI and data patterns. For SwiftUI views, you can now conditionally apply search fields with \searchable(if:)\, control visibility with \visible(if:)\ and \hidden(if:)\, enforce single or multiline text with \forceSingleLine()\ and \forceMultiline()\, apply borders with \border(\:width:cornerRadius:)\, manage enabled states with \enabled(\:)\, and lock dynamic type scaling with \disableDynamicType()\. macOS-specific views can open the system settings via \openAppSettings()\, while views can also prefer fixed menu ordering and hidden system overlays on supported OS versions. Collection and sequence types gain async mapping (\asyncMap\, \asyncCompactMap\), distinct element filtering, grouping, batching, and content checks. Additional helpers include \EdgeInsets\ initializers and edge access, \Comparable\ value limiting, \OpenURLAction\ safe opening, \UserDefaults\ Codable support, and \URL\ App Store link generation.

Sources/SwiftUIKit/Extensions · high confidence

Test coverage

Added test coverage for String extension utilities; Added test coverage for collection, image, and regex utilities; Added tests for Bundle information retrieval; Added tests for device identifier storage; Added unit tests for CSV parsing, MIME types, and AppStorage codable persistence; Added unit tests for Date utility extensions; Added unit tests for SwiftUIKit extensions; Added unit tests for ViewShadowStyle.

Dependencies

Initial package structure with Swift 6.1 and multi-platform support

The project introduces a new Swift Package Manager structure defining the main 'SwiftUIKit' library and a 'StringCatalogKeyBuilder' tool. The main library targets iOS 16, macOS 14, tvOS 16, watchOS 9, and visionOS 1, using Swift tools version 6.1. The accompanying localization tool depends on swift-argument-parser version 1.6.2 (resolved from 1.5.0) and targets slightly older platform versions (macOS 13).

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 58 (-1.9)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 96 → 96 (+0.1)
  • Maturity 64 → 64 (+0.0)
  • Readiness 63 → 59 (-3.6)
  • Security 46 → 46 (+0.0)

Resolved (1)

  • Documentation: no usage examples (README.md)

New (8)

  • Coverage not measured — Swift suite
  • Duplicate properties with identical types and intent. Both identifier and id return a String representing the MIME type's ID.
  • Duplicate types with identical public API surfaces. KeychainService and KeychainWrapper expose the exact same set of methods (accessibility, bool, data, double, float, hasValue, integer, number/object, string, dataRef, set, removeObject, removeAllKeys) with identical signatures. KeychainService appears to be a thin wrapper around KeychainWrapper, exposing the same interface to the user.
  • Method overloading with potentially confusing default behavior. getFileNames() returns all files, while getFileNames(matching:) filters. This is consistent with Swift conventions, but if 'matching' implies a filter, a more explicit name like 'getAllFileNames' vs 'getFileNamesMatching' might be clearer. However, this is a minor style issue, not a strong inconsistency.
  • Outdated: swift-argument-parser
  • Redundant method duplication across duplicate types. The dataRef method exists in both KeychainService and KeychainWrapper, compounding the inconsistency identified above.
  • Redundant method duplication across duplicate types. The generic object method exists in both KeychainService and KeychainWrapper.
  • While not a naming inconsistency per se, the presence of an 'id' property on multiple distinct domain types (Application, Audio, Image, Text, Video) suggests a potential missing protocol or common base type if these are meant to be interchangeable entities. However, without a shared protocol, this is a design observation rather than a strict API inconsistency. If these types are part of a unified 'Media' or 'Content' hierarchy, they should share a protocol. If they are distinct, the naming is consistent but the design might be fragmented. Given the strict scope, this is borderline. I will exclude this as they are distinct domains.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

danielsaidi/SwiftUIKit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6b81a3234a3ee0afc1cdccd347a806da6d69155e — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.