Updated Capacitor configuration and HTML initialization:
Capacitor Config:
- Changed webDir from 'www' to 'public' to match actual directory structure
- Config now correctly points to App/App/public/ directory
HTML Initialization:
- Removed immediate plugin assignment (was failing because Capacitor not loaded)
- Added Capacitor script tags (capacitor.js, capacitor_plugins.js)
- Added initialization script that waits for Capacitor to be ready
- Plugin is now set after Capacitor loads successfully
Fixes:
- Black screen: Capacitor scripts now load before plugin access
- Plugin errors: window.Capacitor was undefined, now waits for it
- Initialization: Proper async loading of Capacitor runtime
Note: capacitor.js and capacitor_plugins.js will be generated by Capacitor
during build or can be copied from node_modules if needed