# AI Church — Mobile Apps

AI Church runs on **every device, 100% free**, three ways:

1. **Install as an app (PWA) — works right now, no build needed.** The site is a full
   Progressive Web App. On a phone, open the site and choose **Add to Home Screen**
   (iOS Safari) or **Install app** (Android Chrome). It launches full-screen with an
   icon, splash and offline app-shell — indistinguishable from a native app, instantly.
2. **Android (.apk)** — a thin WebView wrapper in `mobile/android/` for Google Play / sideloading.
3. **iOS (.ipa)** — a thin WKWebView wrapper in `mobile/ios/` for the App Store / TestFlight.

Both wrappers just load your AI Church URL — so the app updates the moment you update the
site. No app-store review needed for content changes.

> Set your URL in `mobile/android/.../MainActivity.java` (`APP_URL`) and
> `mobile/ios/AIChurch/AIChurchApp.swift` (`APP_URL`). Defaults to `https://aichurch.boreon.com`.

---

## Android (.apk)

**Requirements:** Android Studio (Giraffe+) or command-line Android SDK + JDK 17.

```bash
cd mobile/android
# Android Studio: File → Open → this folder → Run ▶  (builds + installs)
# Or command line:
./gradlew assembleDebug      # → app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleRelease    # configure a signing key first for Play
```

The debug `.apk` installs directly on any Android device (enable "Install unknown apps").
For Google Play, add a `signingConfig` in `app/build.gradle` and upload the signed bundle.
Includes: JavaScript, DOM storage (PWA/offline drafts), file uploads (member photos,
CSV/Excel import), camera permission, and hardware back-button navigation.

## iOS (.ipa)

**Requirements:** a Mac with Xcode 15+ and an Apple Developer account (for device/store).

1. Xcode → **New Project → App** (SwiftUI, name *AI Church*, bundle id `com.boreon.aichurch`).
2. Replace the generated `…App.swift` with `mobile/ios/AIChurch/AIChurchApp.swift`.
3. Merge the keys from `mobile/ios/AIChurch/Info.plist` (display name + camera/photo usage strings).
4. Set your team under Signing & Capabilities → **Run** on a simulator or device.
5. **Archive** (Product → Archive) → distribute to TestFlight / App Store.

WKWebView gives you JavaScript, persistent `localStorage`/cookies, swipe-back, file uploads
and camera for free.

---

## Why a wrapper (and not a separate codebase)?

AI Church is one well-built responsive web app. A WebView wrapper means **one codebase,
every platform**, instant updates, and zero duplicated logic — the right call for a free
platform built to serve churches, not to be rebuilt three times.

© Boreon Industries, LLC & KWAM.CH · Free for churches · *Soli Deo Gloria.*
