SkateSpots/capacitor.config.ts
shakespeare.diy 4b61b14d36 fix: splash screen + ErrorBoundary dark bg for Capacitor APK white screen
- Add SplashScreen.hide() call in main.tsx so splash dismisses when JS loads
- Set launchShowDuration: 0 + launchAutoHide: true in capacitor.config.ts
- Fix ErrorBoundary to use bg-black text-white instead of bg-background
  (bg-background = white before dark class is applied = white screen on error)
- These three combined should eliminate the white screen in the APK

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-06-18 21:27:34 +07:00

41 lines
1 KiB
TypeScript

import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'org.skatespots.app',
appName: 'SkateSpots',
webDir: 'dist',
server: {
// In production the app loads from the bundled dist/ — no remote URL
// androidScheme controls the scheme used for local file loading
androidScheme: 'https',
},
android: {
// Allow mixed content for Nostr WebSocket connections
allowMixedContent: true,
// Capture input for hardware back button
captureInput: true,
// Use the app's dark background for the splash
backgroundColor: '#000000',
},
plugins: {
SplashScreen: {
launchShowDuration: 0,
launchAutoHide: true,
backgroundColor: '#000000',
androidSplashResourceName: 'splash',
androidScaleType: 'CENTER_CROP',
showSpinner: false,
},
StatusBar: {
style: 'Dark',
backgroundColor: '#000000',
},
Keyboard: {
resize: 'body',
style: 'dark',
resizeOnFullScreen: true,
},
},
};
export default config;