ζ-0 Setup: Repo-Skelett, iOS-Build grün, Healthz live
- project.yml mit Bundle ev.mana.zitare + Widget + ShareExt-Targets - ManaSwiftCore (ManaCore + ManaTokens) + ManaSwiftUI (ManaAuthUI) als Package-Dependencies via path: - Pure SwiftUI für Native-Surfaces, WKWebView nur für Lese-Tabs (Hybrid-Sonderfall vs cards/memoro/manaspur, dokumentiert im Playbook ZITARE_NATIVE_GREENFIELD.md) - Theme: paper-Variant aus @mana/themes - ZitareAPI.healthCheck via direct URLSession (öffentlicher Endpoint, kein AuthenticatedTransport-Gate) - 6/6 AppConfigTests + 1/1 UI-Smoke grün auf iPhone 16e Simulator - Live: zitare-api.mana.how/healthz → HTTP/2 200 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
0bd59ed148
25 changed files with 1468 additions and 0 deletions
58
ShareExtension/ShareViewController.swift
Normal file
58
ShareExtension/ShareViewController.swift
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import SwiftUI
|
||||
import UIKit
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
/// Phase ζ-4 Placeholder — Share-Extension „An Zitare schicken".
|
||||
///
|
||||
/// Aufgaben in ζ-4:
|
||||
///
|
||||
/// - Empfängt `NSExtensionActivationSupportsText` + `WebURL`.
|
||||
/// - SwiftUI-Sheet mit Quote-Preview, Source-URL, „Als Draft
|
||||
/// speichern"-Button.
|
||||
/// - POST an `https://zitare-api.mana.how/api/v1/share/receive`
|
||||
/// mit Envelope-Type `mana/text` (siehe `zitare/app-manifest.json`).
|
||||
/// - Bei Network-Failure: in `PendingShareStore` unter App-Group
|
||||
/// persistieren, die App synct beim nächsten Launch.
|
||||
///
|
||||
/// Erfordert ManaCore-Auth-Sharing über Keychain-Access-Group +
|
||||
/// App-Group. Auth-Bridge-Pattern aus cards-native (ShareExtension/)
|
||||
/// übernehmen, wenn ζ-4 startet.
|
||||
class ShareViewController: UIViewController {
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
let hosting = UIHostingController(
|
||||
rootView: ShareRootView(onDone: { [weak self] in
|
||||
self?.extensionContext?.completeRequest(returningItems: nil)
|
||||
})
|
||||
)
|
||||
addChild(hosting)
|
||||
view.addSubview(hosting.view)
|
||||
hosting.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
hosting.view.topAnchor.constraint(equalTo: view.topAnchor),
|
||||
hosting.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||
hosting.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
||||
hosting.view.trailingAnchor.constraint(equalTo: view.trailingAnchor)
|
||||
])
|
||||
hosting.didMove(toParent: self)
|
||||
}
|
||||
}
|
||||
|
||||
struct ShareRootView: View {
|
||||
let onDone: () -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
Image(systemName: "quote.opening")
|
||||
.font(.system(size: 48))
|
||||
Text("An Zitare schicken")
|
||||
.font(.headline)
|
||||
Text("ζ-4 — TODO: POST /api/v1/share/receive")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
Button("Schließen", action: onDone)
|
||||
.buttonStyle(.borderedProminent)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue