Swift-Package-Plattform für alle nativen mana-e.V.-Apps. ManaCore (Auth, Transport) + ManaTokens (Vereins-Design). SOT: mana/docs/MANA_SWIFT.md
Audit 2026-05-17 V4. Ersetzt das hand-getippte Log.swift-Boilerplate
in jeder App durch einen Config-getriebenen Wrapper.
Neu:
- `ManaAppLog` — Factory fuer OSLog-Logger gegen ein ManaAppConfig.
Standard-Kategorien app/auth/api/db/web, plus `category("…")` fuer
app-spezifische Kategorien.
- `ManaAppConfig.appGroup: String?` (default nil) — Single-Source fuer
den App-Group-String, der heute in jeder App 3-4× hardcoded steht.
- `ManaAppConfig.logSubsystem: String` (default = keychainService) —
Subsystem fuer ManaAppLog.
Nichts breaking — beide neuen Felder haben Default-Implementations,
DefaultManaAppConfig.init hat zwei zusaetzliche optionale Parameter.
Tests: 4 neue ManaAppConfig-Tests + 5 neue ManaAppLog-Tests.
85/85 gruen (vorher 76/76).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| devlog | ||
| Sources | ||
| Tests | ||
| .gitignore | ||
| .swiftformat | ||
| .swiftlint.yml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| Package.swift | ||
| README.md | ||
mana-swift-core
Swift-Package-Plattform für alle nativen mana-e.V.-Apps.
Geteilter Code zwischen memoro-native, cards-native, nutriphi-native
und allen weiteren ev.mana.*-Apps. Analog zu @mana/* aus Verdaccio
für die Web-Plattform.
Products
- ManaCore — Auth (mana-auth-Login, JWT-Refresh, Keychain), Transport (URLSession-Wrapper mit 401-Retry).
- ManaTokens — Verein-Designwerte: Farben, Spacings, Typography,
Radius, SF-Symbol-Aliases. Spiegelt
mana/docs/THEMING.md.
Verwendung
Im project.yml einer nativen App:
packages:
ManaSwiftCore:
url: https://git.mana.how/till/mana-swift-core
from: 1.0.0
targets:
YourApp:
dependencies:
- package: ManaSwiftCore
product: ManaCore
- package: ManaSwiftCore
product: ManaTokens
Während Entwicklung lokal:
packages:
ManaSwiftCore:
path: ../mana-swift-core
Konventionen
Siehe CLAUDE.md für die vollständigen Regeln.
Übergeordneter Plan: mana/docs/MANA_SWIFT.md.
Lokal entwickeln
swift build
swift test
iOS + macOS-Targets, Swift 6 strict concurrency, keine externen Dependencies.