- Swift 97.4%
- Python 2.1%
- Shell 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| Config | ||
| Scripts | ||
| Sources | ||
| Tests | ||
| .swiftformat | ||
| manifest.json | ||
| Package.swift | ||
| README.md | ||
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.
FjordObservabilitylinksSentry-Dynamicat the exact version pinned inPackage.swift. Pin the same version in the app so it links one SDK. -
Artwork.
FjordLogoandSplashBackgrounddraw the image assetsFjordMonogramWhite,LaunchSplashandLaunchSplashPlainfrom 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
AppIdentityinObservabilityConfiguration: 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 beforeinstall, 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 stillcom.rasterstate.fjord; it is not part ofAppIdentityyet. 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 insideFjordDesignSystemand registers itself the first time the theme builds a font; callFjordFonts.register()earlier if you draw UIKit text before that.Theme.Typography.fontFamily = .systemstill 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. ALocalizedStringKeytitle you pass in (RetryableErrorView,errorAlert(title:)) still resolves in your app, andFjordLogotakes anaccessibilityLabelfor 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.