Intelligence, Advanced Charting & Trading Platform
feature/chartnova-ios-widget
diagnostics/chartnova-blank-screen-2026-10-15
diagnostics/chartnova-stage2-v27-preview-2026-10-15
docs/chartnova-stage1-reconcile-manifest-2026-10-15
feature/chartnova-ios-widget
feature/chartnova-light-catalog-lazy-series-2026-10-15
feature/chartnova-market-terminal
feature/chartnova-multimarket-chart-ws-foundation
feature/chartnova-neon-direct-history
feature/chartnova-neon-history
feature/paper-trading-risk-controls-2026-10-14
fix/alpha-vantage-live-payload
fix/chartnova-progressive-loading-2026-10-15
fix/live-proof-runner-cwd-2026-10-14
foundation/phase-0
foundation/postgres-core
main
ops/chartnova-emergency-rollback-2026-10-15
phase-1/candle-builder
phase-1/data-proof-artifact
phase-1/data-proof-metrics
phase-1/data-proof-report
phase-1/external-gates-state
phase-1/gold-api-fallback
phase-1/ingestion-pipeline
phase-1/live-proof-runner
phase-1/market-calendar
phase-1/market-domain
phase-1/neon-live-proof
phase-1/persistence-contract
phase-1/postgres-ci
phase-1/provider-adapters
phase-1/provider-recovery
phase-1/quality-propagation
phase-1/spike-detection
phase-1/xau-provider-adapter
risk/chartnova-alert-runtime-atomic-2026-10-22
risk/chartnova-atomic-outbox-2026-10-22
risk/chartnova-seven-track-safety-2026-10-21
safety/p0-triage-2026-10-13
| 1 | # ChartNova iOS + real WidgetKit extension |
| 2 | |
| 3 | This folder contains the **native iPhone companion app and Home Screen widget source**, not a web shortcut. Unlike a PWA, the WidgetKit target appears in the iOS **Add Widget** picker after the containing app has been built, signed and installed. |
| 4 | |
| 5 | ## Features |
| 6 | |
| 7 | - One widget with the standard iOS small, medium and large families, showing **2 / 4 / 6** user-selected instruments respectively. |
| 8 | - App screen to select up to six market symbols from ChartNova's live 58-symbol watchlist, favorite/unfavorite, reorder and choose Nova Glass, dark or light appearance. |
| 9 | - Shared App Group `group.ir.chartnova.widgets` persists preferences between app and widget. |
| 10 | - HTTPS `GET https://app.chartnova.ir/api/widget?symbols=...` with the selected ordered symbols. Zero API keys in the binary; request is served by Cloudflare KV and does not consume 250-per-day upstream requests per widget view. |
| 11 | - WidgetKit timeline asks for a refresh after 15 minutes; **iOS may defer updates** depending on power, budget, connectivity and system policy. |
| 12 | - When offline, last valid response is used and prominently marked as cached / stale. Placeholder **does not invent prices**. |
| 13 | - Tapping widget opens the companion app through `chartnova://widget`. |
| 14 | |
| 15 | ## Building on macOS (required) |
| 16 | |
| 17 | 1. Use a Mac with an Xcode version that supports iOS 17 or later. |
| 18 | 2. Install **XcodeGen** (e.g. `brew install xcodegen`). |
| 19 | 3. Run `cd ios/ChartNova && xcodegen generate`, then open `ChartNova.xcodeproj` in Xcode. |
| 20 | 4. Select your Apple development team under Signing & Capabilities for both `ChartNova` and `ChartNovaWidgets`. |
| 21 | 5. Register and enable the same **App Groups** capability, `group.ir.chartnova.widgets`, for both bundle IDs. Change the sample bundle IDs and group ID if your team's identifiers are different; update both `project.yml` and `Shared/WidgetSettings.swift`. |
| 22 | 6. Build and run the **ChartNova** scheme on your physical iPhone; trust the developer identity if prompted. |
| 23 | 7. Open ChartNova once, select favorites and rearrange the widget list. On the iPhone Home Screen, long-press empty space → **Edit → Add Widget** → search **ChartNova** → choose a size → Add Widget. |
| 24 | 8. For iOS unit tests run `xcodebuild test -project ChartNova.xcodeproj -scheme ChartNova -destination 'platform=iOS Simulator,name=iPhone 16'`; choose an available simulator name if different. |
| 25 | |
| 26 | The App Group and development provisioning are Apple-controlled; without them the widget cannot securely share app preferences. A paid Apple Developer membership may be required for distribution and/or capabilities. Nothing has been published to the App Store or installed on an actual iPhone by this repository change. |
| 27 | |
| 28 | ## Security & correctness |
| 29 | |
| 30 | - Uses HTTPS-only ChartNova backend. No credentials, bearer tokens or API secret keys in the app. |
| 31 | - All selected symbols are allowlisted to uppercase `BASE-QUOTE` pairs with a six-symbol cap. |
| 32 | - Network data is decoded and validated before being cached, with explicit provider timestamps / stale indicators. |
| 33 | - Price values are **provider sell quotes**, not necessarily executable exchange prices, and are not guaranteed to update in real time. |
| 34 | - The iOS application and widget targets share code from `Shared/`. Native widget settings are separate from the browser's localStorage-based preview; automatic cross-device/browser sync requires account support and has **not** been built. |
| 35 | |
| 36 | ## Validation evidence |
| 37 | |
| 38 | Automated tests against the real live ChartNova widget API and static project validation are possible from Windows/Linux. **Xcode compilation, simulator WidgetKit integration and physical iPhone installation require macOS/Xcode and must not be claimed passed until run.** |