136*****142 官方文档里面js向native发消息看到了 conch.postAsyncMessage 但是没找到native向js发消息的方法 在java文件里面找到了ConchJNI.postMsgToRuntime 能运行,但是在js里面监听不到有其他好的方法没 ?
layabox 看这个文档https://layaair.com/3.x/doc/released/native/platform_communication/readme.html 平台代码(Android/iOS)主动执行js脚本iOS/OC执行JS脚本: [[conchRuntime GetIOSConchRuntime] runJS:@"alert('hello')"];Android/Java执行JS脚本: ConchJNI.RunJS("alert('hello world')");