Skip to content

[Feature Request] Support loading local bundled WebView assets #311

Description

@KhanhNguyen1603

Please add official support for loading a bundled local web application in the native WebView.

For example:

webView.loadLocal("web/index.html");

or:

webView.url = "local://web/index.html";

The web files would be packaged inside the Android APK / iOS app:

web/
├── index.html
└── assets/
├── app.js
├── app.css
├── images/
└── fonts/

It should support:

HTML / CSS / JavaScript
ES modules
WebAssembly
SPA routing
Relative assets
IndexedDB / localStorage
Completely offline operation
Existing JavaScript bridge

This would make it much easier to embed modern web applications into Cocos native applications without requiring an external server.

Cocos already provides native WebView support and native extension APIs, so this could be exposed as an official local-content loading feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions