Concise map of what the app is, how it is built, what is broken, and what is next.
For task-specific runbooks, see AGENTS.md and docs/agent/.
Native iOS 16.4+ SwiftUI app for live speech-to-text captions in portrait. Mic → on-screen text → optional edit, history, nearby share. Monetized with AdMob (banner + interstitial) and a Remove Ads non-consumable IAP.
| Item | Value |
|---|---|
| Scheme / target | ClosedCaptioner |
| Bundle ID | RaveSociety.ClosedCaptioner |
| Team | RaveSociety (66R936J3XS) |
| Marketing version | 1.2.1 (MARKETING_VERSION in Xcode) |
| Build number | Xcode Cloud CI_BUILD_NUMBER at archive time |
| Repo | kbibireddy/closed-captioner · branch main |
| ASC app | 6754772689 |
en-US) speech recognition via Speech + AVFoundation.MicController.MAX_RECORDING_TIME_IN_SEC).EmojiService / NaturalLanguage.Theme.swift / AppType.| Tab | Purpose | |—–|———| | Preferences | Display name, emoji detection (experimental), Huddle relay, Day/Night, theme, font | | KPIs | App vs phone CPU/memory/threads; 15 min @ 3s for live series, 1 h @ 30s for slow counters; Message Log can be cleared | | Activity | Captions history (source chips) + Huddle log (plain log lines); Day/Night-style switcher | | Purchases | Remove Ads IAP + Restore |
cc-p2p)tools/p2p-radio — see docs/agent/p2p-test.md.ControlsView VStack (never over buttons).AdsBootstrap.prepareForForeground.ClosedCaptioner (non-consumable). Premium hides all ads.ExportManager: text / PDF / HTML export — no settings entry yet.MVVM with small controllers and singleton managers.
ContentView
├── SpeechService ← recognition, emojis
├── MicController ← 15s timer, bridges SpeechService
├── AppStateViewModel ← theme, day/night, overlays, display name, relay flag
├── HistoryManager ← UserDefaults persistence
├── P2PInboxService ← Huddle (Multipeer) + log + KPI counters
├── PremiumManager ← StoreKit 2, entitlements
└── ControlsView ← chrome, banners, P2P HUD, mic/keyboard/eraser
SettingsView → Preferences | KPIs | Activity | Purchases
| Layer | Key files |
|---|---|
| Models | ColorMode, Theme, CaptionText |
| ViewModels | AppStateViewModel |
| Views | ContentView, ControlsView, CaptionTextDisplay, SettingsView, … |
| Services | SpeechService, AudioService, P2PInboxService, ShakeDetectionService, PickupLineService, AppPerformanceMonitor |
| Controllers | MicController |
| Managers | HistoryManager, ExportManager |
| Ads | AdsBootstrap, BannerAdView, InterstitialCoordinator, AdConfig |
| IAP | PremiumManager, IAPConfig, ClosedCaptioner.storekit |
ControlsView — top bar, banners, P2P log, bottom barUserDefaults)Theme, color mode, display name, relay flag, caption history, P2P KPI counters (persist; no in-app reset).
| Location | Action |
|---|---|
| Top left | Settings |
| Top right | Huddle + status (Tap to join off; on: ↓/↑ B/s from 30s window) |
| Bottom left | Keyboard |
| Bottom center | Mic (long-press start/stop) |
| Bottom right | Eraser |
| Center caption | Flick up (±60°) anywhere on canvas to send (Huddle on); Sent! / Try again |
Day/Night, theme, and font are not on the main screen — Settings → Preferences only.
| Topic | Doc |
|---|---|
| Device install | docs/agent/device-deploy.md |
| Xcode Cloud → App Store | docs/agent/xcode-cloud.md |
| IAP / Remove Ads Retry | docs/agent/iap.md |
AdMob app-ads.txt |
docs/agent/app-ads-txt.md — must live at domain root https://kbibireddy.github.io/app-ads.txt |
| P2P testing | docs/agent/p2p-test.md |
| Privacy copy | PrivacyPolicy.md |
CI: Push to main → Xcode Cloud archives Release → uploads to App Store Connect. Bump MARKETING_VERSION before a new store version; do not reuse a version already Ready for Distribution.
Local IAP testing: Xcode Run with scheme StoreKit config ClosedCaptioner.storekit. TestFlight / xcodebuild installs use the live store catalog.
| Issue | Status / fix |
|---|---|
| Remove Ads shows Retry / purchase unavailable on TestFlight or device deploy | StoreKit returns empty catalog until ASC Paid Apps agreement is Active and IAP ClosedCaptioner is Ready to Submit with full metadata. See docs/agent/iap.md. Local .storekit only applies to Xcode Run. |
| Export | ExportManager implemented; no user-facing export action. |
| Speech locale | Hard-coded en-US only. |
| Huddle / P2P | Background keep-alive exists (UIBackgroundTask + audio/Bluetooth modes) with auto-off timer; iOS may still suspend. Relay is best-effort TTL hop. |
| ASC assets | Prefer Desktop Closed Captioner Assets/output/processed_screenshots/1242x2688 for store screenshots. |
No automated test target in the Xcode project.
Store / monetization
Product
ExportManager).P2P
Housekeeping
HistoryManager, PremiumManager product-ID mapping, P2P envelope parsing.AGENTS.md first; open only the agent doc for your task.ControlsView VStack.SpeechService or center caption.