Repository navigation
Expand file tree
/
Copy pathcapacitor.config.ts
More file actions
38 lines (35 loc) · 1.6 KB
/
Copy pathcapacitor.config.ts
File metadata and controls
38 lines (35 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { CapacitorConfig } from "@capacitor/cli";
const DEV_SERVER = process.env.CAP_DEV_SERVER;
const config: CapacitorConfig = {
// Android applicationId (kept stable so existing installs upgrade in place).
// iOS uses a different bundle id — com.darkstarsystems.pelorus.app, set in the
// Xcode project — because nav.pelorus.app wasn't available under the darkstar
// App Store team. The two stores are independent, so the ids may differ.
appId: "nav.pelorus.app",
appName: "Pelorus Nav",
webDir: "dist",
server: {
androidScheme: "https",
// Pin the iOS scheme explicitly. The WebView origin (scheme://hostname)
// is the storage key for IndexedDB/OPFS — changing it orphans downloaded
// charts and recorded tracks, so keep this stable across releases.
iosScheme: "capacitor",
// When CAP_DEV_SERVER is set, load from Vite dev server for live reload
// and proper Range request support for PMTiles streaming.
// Usage: CAP_DEV_SERVER=http://192.168.0.46:5173 bun run cap:run
...(DEV_SERVER ? { url: DEV_SERVER, cleartext: true } : {}),
},
android: {
// The WebView origin is https://localhost, so a ws:// socket to the boat's
// Signal K server is mixed content, which Android blocks by default.
allowMixedContent: true,
},
plugins: {
// Light status-bar icons from the first frame: the app's top bar is
// dark in every theme but e-ink, and the default (follow the device's
// light/dark mode) drew a black clock on it. main.ts re-applies the
// style per theme.
SystemBars: { style: "DARK" },
},
};
export default config;