Native-Konstanten ziehen mit dem Web-Cutover zu .zitare.com- Subdomains nach. Universal-Link-AASA-Liste enthält jetzt zitare.com + app.zitare.com (zitare.mana.how raus). webBaseURL ist jetzt das echte publicWebURL (zitare.com), wie ursprünglich geplant. CookieBridge bleibt Skeleton — die `.mana.how`-Cookie-Domain- Strategie greift nicht für `.zitare.com`. Hinweis im Kommentar gesetzt, Update vor ζ-3 nötig. Code-Only. Erst nach nächstem Native-Build/TestFlight-Upload live. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
2.5 KiB
Swift
56 lines
2.5 KiB
Swift
import Foundation
|
|
import ManaCore
|
|
|
|
/// App-spezifische Konfiguration für Zitare. Implementiert
|
|
/// `ManaAppConfig` aus ManaCore und ergänzt die Zitare-eigene
|
|
/// `apiBaseURL` (api.zitare.com, getrennt von mana-auth) sowie
|
|
/// `webBaseURL` (zitare.com, für WKWebView und Universal-Links)
|
|
/// und `appBaseURL` (app.zitare.com, für eingeloggte Pfade).
|
|
///
|
|
/// Cutover zu .zitare.com-Subdomains am 2026-05-20. zitare.mana.how
|
|
/// ist abgeschaltet; zitare-api.mana.how bleibt als Back-Compat-
|
|
/// Surface erreichbar, der native Client nutzt sie aber nicht mehr.
|
|
enum AppConfig {
|
|
/// App-Group für Daten-Sharing zwischen App ↔ Widget ↔ ShareExt.
|
|
/// Single-Source: wird in ``manaAppConfig`` und in
|
|
/// `SnapshotModels.appGroup` (Widget-shared) gespiegelt.
|
|
static let appGroup = "group.ev.mana.zitare"
|
|
|
|
static let manaAppConfig: ManaAppConfig = DefaultManaAppConfig(
|
|
authBaseURL: URL(string: "https://auth.mana.how")!,
|
|
keychainService: ManaSharedKeychainGroup,
|
|
// Explizit auf TeamID.BundleID, statt nil. Vermeidet Logout
|
|
// bei TestFlight-Cert-Drift (siehe mana-swift-core v1.5.1).
|
|
keychainAccessGroup: ManaSharedKeychainGroup,
|
|
appGroup: appGroup
|
|
)
|
|
|
|
/// `api.zitare.com` — API-Backend (Hono+Bun).
|
|
static let apiBaseURL = URL(string: "https://api.zitare.com")!
|
|
|
|
/// `zitare.com` — öffentliche statische Korpus-Domain (CC-BY-SA).
|
|
/// Universal-Link-Domain für AASA.
|
|
static let publicWebURL = URL(string: "https://zitare.com")!
|
|
|
|
/// `app.zitare.com` — SPA-Surface, eingeloggte Pfade (Submit,
|
|
/// Edit, Admin, Me).
|
|
static let appBaseURL = URL(string: "https://app.zitare.com")!
|
|
|
|
/// Default-URL für den WebView (öffentliches Lese-Surface).
|
|
static let webBaseURL = publicWebURL
|
|
|
|
/// Endpoint für den Korpus-Snapshot (Phase ζ-2). Heute noch nicht
|
|
/// als statische HTTP-Datei publiziert — Aufgabe im Web-Repo:
|
|
/// `apps/zitare/static/index-min.json` aus dem Snapshot-Job
|
|
/// zusätzlich rauskopieren. Bis dahin schlägt der Pull mit 404
|
|
/// fehl und `SnapshotSync.tryRefresh()` macht fail-soft no-op.
|
|
static let snapshotURL = webBaseURL.appendingPathComponent("index-min.json")
|
|
|
|
/// User-Agent-Suffix für WKWebView (ManaWebShell). WKWebView hängt
|
|
/// das an seinen Standard-UA an, ersetzt ihn nicht.
|
|
#if os(macOS)
|
|
static let userAgent = "ZitareNative/0.1 (macOS)"
|
|
#else
|
|
static let userAgent = "ZitareNative/0.1 (iOS)"
|
|
#endif
|
|
}
|