SmileZXLee / ZXRequestBlock

基于NSURLProtocol一句话实现iOS应用底层所有网络请求拦截(含网页ajax请求拦截【不支持WKWebView】)、一句话实现防抓包(使Thor,Charles,Burp等代理抓包方式全部失效,且即使开启了代理,也不影响App内部的正常请求)。包含http-dns解决方法,有效防止DNS劫持。用于分析http,https请求等
MIT License
337 stars 86 forks source link

crash 原因-[NSURLSessionConfiguration disposition] unrecognized selector #14

Closed rtcatc closed 1 year ago

rtcatc commented 1 year ago

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLSessionConfiguration disposition]: unrecognized selector sent to instance 0x2839e96c0' First throw call stack: (0x1bcd1498c 0x1bca3d0a4 0x1bcc1843c 0x1bcd18e08 0x1bcd1abec 0x1bff0ede4 0x10d508380 0x10d508468 0x105dbd160 0x1bca44ecc 0x10767a0d4 0x10768958c 0x107688308 0x1076883d0 0x10767a420 0x10767edb4 0x107679208 0x107679038)

rtcatc commented 1 year ago

版本 ios 13.1.2

rtcatc commented 1 year ago

我把 ZXRequestBlock/NSURLSession+ZXHttpProxy.m内的 configuration = [[NSURLSessionConfiguration alloc] init]; 改成了 configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; 就可以了(参考:https://github.com/lionheart/openradar-mirror/issues/7707 ) 但不知道会不会产生其他问题,待测试

rtcatc commented 1 year ago

对MobileSafari (系统浏览器hook测试无问题) 我将提pull request上来

image image
SmileZXLee commented 1 year ago

感谢pr!