From 9f79547556461fb82db43ad5bd2b5f8be2fee1c0 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 11 Nov 2025 20:17:11 -0800 Subject: [PATCH] fix(ios): add debug logging to verify HTML loading Added immediate DOMContentLoaded handler to verify HTML is loading: Debug Logging: - Added console.log when DOM loads - Added body element check and background color set - Helps diagnose if HTML is loading at all Fixes: - Black screen debugging: can now see if HTML loads - JavaScript execution: verifies scripts are running - WebView loading: confirms WebView is serving HTML Result: Can now diagnose if issue is HTML loading or JavaScript execution --- test-apps/ios-test-app/App/App/public/index.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test-apps/ios-test-app/App/App/public/index.html b/test-apps/ios-test-app/App/App/public/index.html index b5b7e68..a3f9ab4 100644 --- a/test-apps/ios-test-app/App/App/public/index.html +++ b/test-apps/ios-test-app/App/App/public/index.html @@ -83,6 +83,18 @@ console.log('Script loading...'); console.log('JavaScript is working!'); + // Show immediate feedback that HTML is loading + document.addEventListener('DOMContentLoaded', function() { + console.log('DOM Content Loaded!'); + const body = document.body; + if (body) { + body.style.backgroundColor = '#667eea'; + console.log('Body element found, background color set'); + } else { + console.error('Body element not found!'); + } + }); + // DailyNotification will be set after Capacitor loads (see initialization script at end) // Define functions immediately and attach to window