357ba7d8c8
Android 16 (API 36) enforces edge-to-edge rendering unconditionally, breaking @capacitor/status-bar's setOverlaysWebView and setBackgroundColor. Additionally, a Chromium bug (<140) causes env(safe-area-inset-*) to report 0 in some Android WebViews. - Replace @capacitor/status-bar with SystemBars from @capacitor/core 8+ - Enable insetsHandling: 'css' in capacitor.config.ts so the SystemBars plugin injects --safe-area-inset-* CSS variables on Android - Update all safe area CSS utilities and inline styles to use var(--safe-area-inset-*, env(safe-area-inset-*, 0px)) fallback pattern - Remove @capacitor/status-bar dependency (no longer needed)
36 lines
829 B
TypeScript
36 lines
829 B
TypeScript
import type { CapacitorConfig } from '@capacitor/cli';
|
|
|
|
const config: CapacitorConfig = {
|
|
appId: 'pub.ditto.app',
|
|
appName: 'Ditto',
|
|
webDir: 'dist',
|
|
server: {
|
|
// Handle deep links from your domain
|
|
hostname: 'ditto.pub',
|
|
androidScheme: 'https',
|
|
iosScheme: 'https'
|
|
},
|
|
android: {
|
|
// Enable safe area handling for notches and navigation bars
|
|
allowMixedContent: false,
|
|
backgroundColor: '#14161f'
|
|
},
|
|
ios: {
|
|
backgroundColor: '#14161f',
|
|
contentInset: 'never',
|
|
scheme: 'Ditto'
|
|
},
|
|
plugins: {
|
|
Keyboard: {
|
|
resizeOnFullScreen: true,
|
|
},
|
|
SystemBars: {
|
|
// Inject --safe-area-inset-* CSS variables on Android to work around
|
|
// a Chromium bug (<140) where env(safe-area-inset-*) reports 0.
|
|
insetsHandling: 'css',
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|