KKJSBridge icon indicating copy to clipboard operation
KKJSBridge copied to clipboard

一站式解决 WKWebView 支持离线包,Ajax/Fetch 请求,表单请求和 Cookie 同步的问题 (基于 Ajax Hook,Fetch Hook 和 Cookie Hook)

Results 24 KKJSBridge issues
Sort by recently updated
recently updated
newest added

![image](https://user-images.githubusercontent.com/15136916/139176002-9b3b0275-1a49-447d-9b77-a795c000636f.png) 例如这个国家级唱将。。。 ![image](https://user-images.githubusercontent.com/15136916/139176081-83825dda-760a-48ac-a7d3-f52342f778af.png)

请教下,我用wkwebview 用这种方式处理cookie是可以的,https://github.com/GaoGuohao/GGWkCookie 这个链接,包括删除或者更新某个cookie,但是用kkwebview发现更新删除不成功,我以为是kkwebview 复用的问题,但是我退出登录的时候调用了clearAllReusableWebViews发现 问题依然存在,请问是kkwebview内部做了什么处理吗?

为了实现webView和navtive埋点数据的同步,我们把page数据放到了cookie中给前端去读取。 前端读取cookie的时候(html、样式、脚本等静态资源加载完成,脚本文件开始解析执行),发现 window.prompt("KKJSBridge", messageString) 返回的response为null。打断点后发现prompt并没有触发UIDelegate的代理方法。 ``` KKJSBridge.prototype.syncCall = function (module, method, data) { function call() { var message = xxx var messageString = JSON.stringify(message); var response = window.prompt("KKJSBridge", messageString); return...

//利用 requestId 生成新的 url _KKJSBridgeXHR.generateNewUrlWithRequestId = function (url, requestId) { ... var search = aTag.search ? aTag.search : ""; ... url = orignAction.replace(search, "").replace(hash, ""); ..... var newAction = url...

ajax async:false同步请求不生效,不会等success回调后再执行下面代码, 我尝试修复,使用window.prompt("SyncCall",obj),但是发现iOS14不行,iOS14以下正常了。 请问有什么好的方案解决同步问题吗?

enhancement
tip
resolved

之前项目里都是用的原生的WKWebView,主要目的是拦截h5里的请求,现在想用您这个框架解决拦截过程中body丢失的问题,如果用外部代理代码改动量很大,自己新建一个NSURLProtocol好像还是需要使用到KKJSBridgeEngine,能否就这种情况简单给个示例,感谢!

tip

``` #11 com.apple.CFNetwork.CustomProtocols NSInvalidArgumentException -[__NSArrayM bytes]: unrecognized selector sent to instance 0x174e40750 0 CoreFoundation ___exceptionPreprocess + 124 1 libobjc.A.dylib _objc_exception_throw + 56 2 CoreFoundation ___methodDescriptionForSelector 3 CoreFoundation ____forwarding___ + 916...