Shared Swift packages for Fjord Apple apps (design system, observability, icons)
  • Swift 97.4%
  • Python 2.1%
  • Shell 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stephen Way 6172606394
All checks were successful
CI / Icon usage lists (push) Successful in 17s
CI / Build and test (iOS Simulator) (push) Successful in 1m19s
Ship the Share fonts and the design system's strings inside FjordDesignSystem (GRD-486) (#4)
2026-11-19 03:33:56 +00:00
.forgejo/workflows Make build identity, release name and artwork requirements host-configurable (GRD-488) (#3) 2026-11-19 02:36:07 +00:00
Config Generate FjordIcons from the union of per-app usage lists (GRD-490) (#2) 2026-11-19 02:21:03 +00:00
Scripts Generate FjordIcons from the union of per-app usage lists (GRD-490) (#2) 2026-11-19 02:21:03 +00:00
Sources Ship the Share fonts and the design system's strings inside FjordDesignSystem (GRD-486) (#4) 2026-11-19 03:33:56 +00:00
Tests Ship the Share fonts and the design system's strings inside FjordDesignSystem (GRD-486) (#4) 2026-11-19 03:33:56 +00:00
.swiftformat Generate FjordIcons from the union of per-app usage lists (GRD-490) (#2) 2026-11-19 02:21:03 +00:00
manifest.json Generate FjordIcons from the union of per-app usage lists (GRD-490) (#2) 2026-11-19 02:21:03 +00:00
Package.swift Ship the Share fonts and the design system's strings inside FjordDesignSystem (GRD-486) (#4) 2026-11-19 03:33:56 +00:00
README.md Ship the Share fonts and the design system's strings inside FjordDesignSystem (GRD-486) (#4) 2026-11-19 03:33:56 +00:00

fjord-apple-kit

Shared Swift packages for Fjord Apple apps: the Fjord iOS app and Fjord Grid. One repository, one version tag, three library products.

Product What it is
FjordIcons The icon set and its SwiftUI views.
FjordObservability Crash reporting and product analytics building blocks that name nothing from an app. The app installs its own ObservabilityConfiguration (log subsystem, hosts it operates) first thing at launch and passes an ObservabilityRecording where a component needs to report.
FjordDesignSystem Theme, colors, button styles, error and retry views, the adaptive shell, loaders.

None of them depends on ForgejoKit, a Fjord Account client or Push, so an app that is not a Forgejo client can use them.

Use

.package(url: "https://rasterhub.com/rasterstate/fjord-apple-kit.git", exact: "<tag>")
// then, per target:
.product(name: "FjordDesignSystem", package: "fjord-apple-kit")

In an xcodegen project.yml:

packages:
  FjordAppleKit:
    url: https://rasterhub.com/rasterstate/fjord-apple-kit.git
    exactVersion: "<tag>"
# target dependencies:
  - package: FjordAppleKit
    product: FjordDesignSystem

iOS 17 or later, Swift 6 language mode.

Things a host app provides

  • Sentry. FjordObservability links Sentry-Dynamic at the exact version pinned in Package.swift. Pin the same version in the app so it links one SDK.

  • Artwork. FjordLogo and SplashBackground draw the image assets FjordMonogramWhite, LaunchSplash and LaunchSplashPlain from the app's asset catalog. An app that uses them provides them; a debug build logs a fault, once per name, when one is missing. One that does not use these views needs none.

  • App identity. Build classification and the Sentry release name come from the AppIdentity in ObservabilityConfiguration: the store, development and (optional) lab bundle identifiers, and the release prefix. It is required (Fjord iOS passes .fjordIOS); a fault is logged (once, in every build) if anything reads it before install, because an app that is not Fjord iOS would be classified and released as one. Install it with the log subsystem and operated hosts, first thing at launch:

    ObservabilityConfiguration.install(ObservabilityConfiguration(
        operatedHosts: [...],
        identity: .init(
            appStoreBundleIdentifier: "com.example.app",
            developmentBundleIdentifier: "com.example.app.dev",
            releasePrefix: "example-app"
        )
    ))
    
  • AppBundle.base. The identifier base for Spotlight types, quick-action prefixes and notification names is still com.rasterstate.fjord; it is not part of AppIdentity yet. An app that uses those helpers should not share Fjord's names.

  • Fonts and strings. None to provide. The Share font family (SIL OFL, text in Sources/FjordDesignSystem/Fonts/OFL.txt) ships inside FjordDesignSystem and registers itself the first time the theme builds a font; call FjordFonts.register() earlier if you draw UIKit text before that. Theme.Typography.fontFamily = .system still selects the system font. The design system's own strings (error alert, loading label, stale-data sentences, appearance and accent names) live in its own String Catalog in the 11 shipped languages and resolve there, not in the app's catalog. A LocalizedStringKey title you pass in (RetryableErrorView, errorAlert(title:)) still resolves in your app, and FjordLogo takes an accessibilityLabel for your own name.

Icons

FjordIcons is generated from the pinned fjord-icons commit (Config/fjord-icons-revision) and the union of the per-app usage lists in Config/icons-usage/<app>.json. Each consuming app owns one list ({"app": "<slug>", "icons": [...]}; a concept key such as utility/gear selects both masters). To add icons, edit your app's list, check out the pinned fjord-icons commit in a clean clone and run:

Scripts/update-icons.sh ../fjord-icons

Commit the regenerated Sources/FjordIcons and manifest.json with the list change; CI fails if a list names an icon the kit does not carry, the kit carries one no list names, or manifest.json, FjordIconKey.swift and the asset catalog disagree. A new icon ships with the next kit tag. To adopt a newer fjord-icons commit, change Config/fjord-icons-revision and regenerate. swiftformat on PATH formats the output with the repo's .swiftformat.

Provenance

The code was imported from fjord-ios (Packages/FjordIcons, Packages/FjordObservability, Packages/FjordDesignSystem) in a single commit that names the source commit. History stays in fjord-ios.

CI

.forgejo/workflows/ci.yml builds every product for the iOS Simulator and runs the package tests on the org's macOS runners. The fuller behavioural and rendering suites for these types still run in fjord-ios, which owns the telemetry contract and the screenshots.