Cross-platform Swift utilities for Apple platforms — Foundation Core + SwiftUI UI, from a single SwiftPM package.
import Foundation
import MatrixSwiftBaseCore
// Helpers
let clamped = MathHelper.clamp(150, min: 0, max: 100)
try await SleepHelper.milliseconds(250)
let token = RandomHelper.string(length: 32)
// Networking
struct User: Decodable { let id: Int; let name: String }
struct Me: Endpoint { let path = "/users/me" }
let client = APIClient(baseURL: URL(string: "https://api.example.com")!)
let user: User = try await client.send(Me()).package(url: "https://github.com/rtorcato/swift-common", branch: "main")Use with AI
A skill ships in the repo so AI coding tools use swift-common the way it's meant to be used.
npx skills add https://github.com/rtorcato/swift-common --skill swift-common/plugin marketplace add rtorcato/swift-common/plugin install swift-common@swift-commonAGENTS.md from the repo root. Copy it into your project's agent config.https://github.com/rtorcato/swift-common/blob/main/AGENTS.mdCore and UI, side by side
Two SwiftPM products. Four Apple platforms. 130+ types organised by what they need at compile time.
Date, math, crypto, currency, JSON, regex, random, mime-type, and more.
Drop-in additions to Array, Bool, Date, Dictionary, Set, URL.
APIClient + Endpoint + typed NetworkError. URLSession under the hood.
Keychain, location, app errors, themes, notifications, file-type enums.
Cards, buttons, containers, web view, QR codes, rating, sticky headers.
Alerts, keyboard, colour, haptics, photo picker, local auth, vision kit.
Animatable font, border radius, pressable button, rounded button, blur.
Image cache, system theme tracking, sound, beacon detection.
Sibling projects
More from @rtorcato — same conventions, same release pipeline.
Tree-shakeable TypeScript utilities — tiny bundles, full type safety, CLI included.
Framework-agnostic building blocks for Node.js APIs — errors, auth, rate limiting, OpenAPI, Express + Hono.
Tree-shakeable TypeScript wrappers around 40+ browser Web APIs — one subpath per spec.
Shared, tree-shakeable TypeScript database utilities for Node projects.
Typed TypeScript wrappers and helpers for Cloudflare bindings and APIs.
Published React 19 component library — shared UI primitives.
Shared, tree-shakeable TypeScript helpers for Supabase — client, auth, and database utilities.
One wizard to scaffold TypeScript, linting, testing, and releases for any JS project.
Turns ai-ready GitHub issues into reviewed PRs — one worktree per issue, two agent reviewers.
Banner, social card and favicon for any repo.