[mod] iOS可以用的溝通Cocos

This commit is contained in:
建喵 2022-08-29 13:59:46 +08:00
parent cfe31371af
commit ecad6d01e3

View File

@ -62,7 +62,7 @@ export default class Manager extends cc.Component {
self.Birdge(method, value);
};
}
let scheme: string = "http";
let scheme: string = "jmka";
this.webview.setJavascriptInterfaceScheme(scheme);
this.webview.setOnJSCallback((sender: any, url: any) => {
let content: string = decodeURI(url.split(`${scheme}://?data=`)[1]);