Capacitor init — add iOS native shell #78
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing#78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
project-capacitor-mobile→ Board item (westside first consumer)Repo
forgejo_admin/westside-appUser Story
As a dev agent
I want to add Capacitor to westside-app with iOS support
So that the SPA can be wrapped in a native WKWebView for App Store distribution
Context
westside-app is already a SvelteKit SPA with adapter-static and keycloak-js auth — Capacitor-compatible from day one. This task adds the Capacitor layer: core packages, iOS native project, and platform detection for auth redirects.
The app ID should be
com.westsidekingsandqueens.app(public domain convention for App Store apps).Platform detection for Keycloak auth follows mcd-tracker's proven pattern:
Capacitor.isNativePlatform()→capacitor://localhost/for iOS, elsewindow.location.originfor web.File Targets
Files to create/modify:
capacitor.config.ts— new, Capacitor configuration (webDir: 'build', appId, appName)src/lib/keycloak.js— add platform detection for redirect URIpackage.json— add @capacitor/core, @capacitor/cli, @capacitor/ios, @capacitor/appFiles NOT to touch:
svelte.config.js— already correct (adapter-static, fallback: 'index.html')src/app.css— design system unchangedAcceptance Criteria
npm installsucceeds with Capacitor packagesnpx cap initcreates capacitor.config.ts with appIdcom.westsidekingsandqueens.appnpx cap add iosgenerates ios/ directory with Xcode projectnpm run build && npx cap sync ioscompletes without errorsTest Expectations
npm run buildstill produces static output in build/npx cap sync ioscopies build output to ios/App/App/public/Constraints
Checklist
Related
project-capacitor-mobile— architecture referencesop-capacitor-mobile-lifecycle— Stage 2 (Promotion to Capacitor App)