Closed DanielHerr closed 1 month ago
TWAs load external websites, while Capacitor apps load local assets that are shipped with the app. Also Capacitor relies in the WebView request interception to act as a local web server, which is not possible in TWAs, so lo load local requests in a TWA it would require to use a real local web server, which would be insecure and I'm not even sure if that would work for a TWA.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Description
Android TWA support as Webview alternative
Platforms
Request or proposed solution
TWAs run inside Chrome instead of in a Webview, so it can have superior rendering performance #4187, and many Web APIs are supported in Chrome but not in Webview.
As of Chrome 115, TWA supports messaging between Android and Web code, so as far as I know it should be possible to implement Capacitor.
Alternatives
No response
Additional Information
https://developer.chrome.com/docs/android/post-message-twa