coderyi / networkeye Goto Github PK
View Code? Open in Web Editor NEWa iOS network debug library, monitor HTTP requests
Home Page: http://coderyi.com
License: MIT License
a iOS network debug library, monitor HTTP requests
Home Page: http://coderyi.com
License: MIT License
关于networkeye是否需要数据库的讨论,请问大家觉得拦截到的请求需要存储到数据库吗?
1.networkeye其实是一个小东西,是否需要一个数据库这样一个比较重的东西,
2.因为网络请求有时候插入速度比较快,比如访问UIWebView的时候,有时候就会插入很多请求,这样也会造成一些插入出错
3.插入数据库,我目前只插入JSON和XML,有些情况,比如网页的联调,或者一些文本等就不方便插入数据库了
4.如果不用数据库,不在内存的时候就看不到了;比如很多崩溃就是因为网络请求的错误,崩溃之后就看不到网络请求的信息了
换成get 是把参数拼接到url 后面
hi, thanks for your tools.
i hope there's a function of making those apis with a mark after checked, cause there' many apis in the list and their names are nearly the same as each other that i cant not tell them until i checked the content inside it. this is really troublesome.
thanks again.
最好能收集成报表日志格式,用来验证检查相关网络请求合法有很好的鉴定意义。
采用NSURLSessionDataTask发出去的请求,都会被拦截下来变成NSURLConnection
发出去,这样iOS7之后出的这套API就没啥用处了。仅仅只是上层用了新的API来创建了一个request而已,实际是被NSURLConnection
接管了。NSURLSession
的共享cookies、验证策略、少一次握手等这些功能都没有了。
个人觉得是一种得不偿失的方法,请问,有没有其他的解法。
2016年底之后iOS app 将取消http的,所以使用charles就增加了一个门槛。所以NetworkEye的使用需求将会增加。所以这里需要改善一下。
去除把捕获的每一个请求保存数据库的逻辑(太影响速度了),只有需要的时候(比如看到一个错误请求)才主动保存数据库。这个跟charles不主动保存,需要的时候export一个样。
记得加上!
本来使用了NSURLRequestReturnCacheDataDontLoad,但却没有加载缓存
In the line
https://github.com/coderyi/NetworkEye/blob/master/NetworkEye/NetworkEye/NEHTTPEye.m#L152
if any error happened, returnValue
will be nil and the app will crash.
so I found out that the delegate (NSURLConnectionDataDelegate) method - connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite: is never called when NetworkEye is enabled. So in connections that need progress tracking I disable NetworkEye first. I tried to fix it myself but I can't see a way of doing so with the current library design. I hope that you can find a way around it. Keep up the good work (Y)
这样可以在 EXCLUDED_SOURCE_FILE_NAMES 用 NEHTTP* 一次全部 exclude 掉,方便 release
不用写好几种了XD
这种方案会导致kept-alive为NO,对网络速度是有影响的,有没有解决方案
Networkeye discussion about the need for a database, what you think needs to be stored intercepted requests to databases?
1.networkeye actually a little thing, whether you need a database such a heavy thing,
Multipath TCP 的请求无法统计!!!会导致请求失败
A filter in the monitor view is helpful since we always help a lot of network request.
Thanks.
Podfile
pod 'FMDB/SQLCipher', '~> 2.6.2'
pod 'NetworkEye', '~> 1.0.6'
当使用上面的配置时,NetworkEye 不会启动加密模块。
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController.'
-[NEHTTPEye stringWithDate:]
里面的dateFormatter可以用static来优化一下吧,NSDateFormatter初始化还是比较耗时的。
可以监控到用ASIHttpRequest请求网络的那些数据嘛?
当发版enable=NO 时,去掉NSURLSessionConfiguration 的swizzleSelector
Requested sleep of 54 milliseconds, but SQLite returned 1000. Maybe SQLite wasn't built with HAVE_USLEEP=1?
基本上可以定位到这个地方
static int FMDBDatabaseBusyHandler(void *f, int count)
Requests by WKWebView can't be monitored
response json 也是空白
Hello, I'm having some problems importing the framework from CocoaPods into a Swift project.
Podfile:
pod 'NetworkEye', '~> 0.9.8'
Bridging-Header:
Error when building in the bridging-header import: "Could not build module 'NetworkEye'
By going further, it seems this line is failing inside NEHTTPModelManager.h
I guess it's a pod related thing but it would be super awesome if you could fix this problem as I find this tool to have great potential.
Cheers!
之前遇到debug的时候webview授权请求失败,然后接着是SDwebimage的加载图片失败,有点坑,真心没想到是这个库的问题!困惑了2天的问题终于搞定了!
NetworkEye框架会在iOS10以下截获微博网页授权登录信息,导致授权不成功
Steps to reproduce the bug:
POST
.I always can call out the monitoring data interface when I use a double tap or shake device in release mode. How to disable?
close
在模拟器是可以的,真机摇一摇没这个功能
在 iOS 8 之前,我们在 UITableView 上添加搜索框需要使用 UISearchBar + UISearchDisplayController 的组合方式,而在 iOS 8 之后,苹果就已经推出了 UISearchController 来代替这个组合方式。在 iOS 13 中,如果还继续使用 UISearchDisplayController 会直接导致崩溃,崩溃信息如下:
引用:https://www.jianshu.com/p/767e6f2d8435
流量的获取是用的NSURLResponse的 expectedContentLength,但这应该只是在网络正常情况下,请求完全走通后的一个数据,并不能代表实际真实产生的流量吧,请问这个需要怎么获取网络不好,请求走到一半就断了的情况?
I found out that NEURLSessionConfiguration
is always return NEHTTPEye
in the protocolClasses.
Can we add a configuration to close the monitor in release mode? Thanks.
将demo中的UIWebView
去掉,只发送testRequest
方法中的 "https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/AFNetworking/2.5.4/AFNetworking.podspec.json" 这个请求,发现获取不到httpbody,httpbody为空。
I modify data like this: (in NEHTTPEye.m)
-(id) responseJSON {
。。。
if(error){
NSLog(@"JSON Parsing Error: %@", error);
return nil; // <= here
}
。。。
}
When "returnValue" is nil , the "NSJSONSerialization" will raise a NSException. So I return right now when error is not nil.
canonicalRequestForRequest:在Protocol的init之后就调用了,我在其中修改了request。
其后startLoading中再次调用它,这时传入的self.request已经是canonical过的了,更糟的是,有可能会覆盖前一次的修改。
I think sometimes copy&paste from console is needed when debug.
The main reason is that I don't know how to copy url from iOS simulator...
就可以手机抓包了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.