ManaCore + ManaTokens als Swift-Package für alle nativen mana-e.V.-Apps. Phase α aus mana/docs/MANA_SWIFT.md durch. ManaCore: - AuthClient gegen mana-auth (Login, Refresh, Status-Maschine) - AuthenticatedTransport (URLSession + 401-Retry) - ManaAppConfig-Protocol für App-injizierbare Konfig - KeychainStore mit optionaler Shared-Access-Group - JWT-Parser für lokale Expiry-Prüfung - AuthError, CoreLog (interne OSLog-Logger) ManaTokens: - 12 Vereins-Tokens als dynamic Light/Dark Colors - 5 Brand-Literale (mana-yellow, spectrum-orange, ...) - Spacing, Radius, Typography aus mana/docs/THEMING.md Tests: 12 Unit-Tests grün via swift test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
55 lines
1.2 KiB
Markdown
55 lines
1.2 KiB
Markdown
# 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:
|
|
|
|
```yaml
|
|
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:
|
|
|
|
```yaml
|
|
packages:
|
|
ManaSwiftCore:
|
|
path: ../mana-swift-core
|
|
```
|
|
|
|
## Konventionen
|
|
|
|
Siehe [CLAUDE.md](CLAUDE.md) für die vollständigen Regeln.
|
|
Übergeordneter Plan: `mana/docs/MANA_SWIFT.md`.
|
|
|
|
## Lokal entwickeln
|
|
|
|
```bash
|
|
swift build
|
|
swift test
|
|
```
|
|
|
|
iOS + macOS-Targets, Swift 6 strict concurrency, keine externen Dependencies.
|