karosLi / KKJSBridge

一站式解决 WKWebView 支持离线包,Ajax/Fetch 请求,表单请求和 Cookie 同步的问题 (基于 Ajax Hook,Fetch Hook 和 Cookie Hook)
MIT License
693 stars 120 forks source link

swift崩溃在了设置代理的方法 #24

Closed herody closed 4 years ago

herody commented 4 years ago

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[KKJSBridgeConfig setAjaxDelegateManager:]: unrecognized selector sent to class 0x1088d56f8'

karosLi commented 4 years ago

你那边swift具体是怎么调用的?

herody commented 4 years ago

按照demo里写的。用pod一直崩溃,现在我直接把代码拖进去,发现不崩溃了,不知道是什么原因

karosLi commented 4 years ago

可以把你demo发我调试下

herody commented 4 years ago

试了新版本,没有崩溃了,但是这一块的error不支持传nil,传入可选类型会有点问题

截屏2020-07-07 上午11 51 14
karosLi commented 4 years ago

嗯,这里要改成可选类型

karosLi commented 4 years ago

你现在使用的是哪个版本

karosLi commented 4 years ago

KKJSBridge 1.1.5 试下这个版本,让error成为了可选类型了

herody commented 4 years ago

好的,谢谢啦