feat(app): iOS-skallen — Capacitor, Xcode-projektet og et CI-job, der bygger den

Femte trin mod iOS-appen. Fladen fra trin 3 pakket ind i en rigtig app.

- `app/`: Capacitor 8 med SPM (ingen CocoaPods). `npm run sync` bygger web
  med VERDANDE_TARGET=app og kopierer det ind i Xcode-projektet; `npm run
  open` åbner det på en Mac. Bundle-id `dk.nolimit.verdande`.
- `app/ios/` er committet. Webbygget og den genererede konfiguration i det er
  ikke — sync lægger dem der.
- `NSAllowsLocalNetworking`: en hjemmeserver uden certifikat kan nås med http
  på det lokale net; alt på internettet skal stadig være https.
- Ikon og opstartsbillede tegnes fra web/static/icon.svg
  (scripts/generate-ios-assets.js). Kvadratisk og uden gennemsigtighed, fordi
  iOS runder hjørnerne selv.
- CI-jobbet "iOS app shell" bygger og synker på Linux og tjekker, at
  app-bygget ikke registrerer en service worker. Ingen Xcode i CI; det dækker
  alt op til den.
- docs/ios.md: hvordan appen adskiller sig fra en browser, hvordan den bygges,
  hvad der er ejerens skridt (Apple-konto, signering, TestFlight), og hvad der
  mangler — notifikationer via APNs venter på en beslutning om en relay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kristianwind
2026-10-23 14:21:44 +02:00
co-authored by Claude Opus 5.5
parent b9028e8f7a
commit ce1e12417b
27 changed files with 2121 additions and 0 deletions
+34
View File
@@ -51,6 +51,40 @@ jobs:
- name: Build
run: CGO_ENABLED=0 go build ./...
# The iOS app's shell: the interface built the way the app carries it, and
# copied into the Xcode project. No Xcode here — that build happens on a Mac —
# but a config the CLI cannot read, a webDir that moved, or an app build that
# stopped compiling all fail at this step rather than on the day somebody sits
# down to ship.
app:
name: iOS app shell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install
run: |
(cd web && npm ci)
(cd app && npm ci)
- name: Build and sync
working-directory: app
run: npm run sync
# The app build must not register the service worker — WKWebView has none
# for the app's own scheme. The browser build registers it from index.html.
- name: No service worker in the app build
run: |
if grep -qF 'serviceWorker.register' web/build/index.html; then
echo "The app build registers a service worker in index.html."
exit 1
fi
test -f app/ios/App/App/public/index.html
echo "App build in the Xcode project: $(find app/ios/App/App/public -type f | wc -l) files."
spec:
name: OpenAPI is valid
runs-on: ubuntu-latest