1 Star 0 Fork 0

popor / PoporNetRecord

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

MyBox

PoporNetRecord

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

思路模仿自LLDebugTool, https://github.com/HDB-Li/LLDebugTool.git ,但是我只需要监测所有的网络请求,另外其他需求也不一致,所以有了本framework.

若想在Web页面显示 WIFI 名称,需要针对iOS12在Xcode中设置。
参考详情:https://www.jianshu.com/p/751625d4d282

选择Target,在Capabilities中,激活Access WiFi Infomation项。

Requirements

Installation

PoporNetRecord is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PoporNetRecord'
修改弹出方式

PnrConfig * config = [PnrConfig share];
config.presentNCBlock = ^(UINavigationController *nc) {
    // ... other
    nc.modalPresentationStyle = UIModalPresentationFullScreen;
}

电脑浏览器访问,假如使用chrome或者QQ浏览器,安装json-handle插件,可以点击[数据返回]进行更好的查看json数据

1.07 详情页面增加再次转发功能

1.09 增加PnrBlockPVoid viewDidloadBlock; 方便设定ballBT属性

1.10 防止iPhoneX屏幕, bt位于屏幕正上方无法点击 autoFixIphoneXFrame : 默认为YES, 防止ballBT位于在屏幕上方出现, iPhoneX机型可能无法点击到ballBT.

1.11 参数属性修改,不然假如传递来的参数是NSMutableString,会造成不知名的修改数据. 来自:https://github.com/ChenYilong/iOSInterviewQuestions/blob/master/01%E3%80%8A%E6%8B%9B%E8%81%98%E4%B8%80%E4%B8%AA%E9%9D%A0%E8%B0%B1%E7%9A%84iOS%E3%80%8B%E9%9D%A2%E8%AF%95%E9%A2%98%E5%8F%82%E8%80%83%E7%AD%94%E6%A1%88/%E3%80%8A%E6%8B%9B%E8%81%98%E4%B8%80%E4%B8%AA%E9%9D%A0%E8%B0%B1%E7%9A%84iOS%E3%80%8B%E9%9D%A2%E8%AF%95%E9%A2%98%E5%8F%82%E8%80%83%E7%AD%94%E6%A1%88%EF%BC%88%E4%B8%8A%EF%BC%89.md

摘自上面网页注释
下面做下解释: copy 此特质所表达的所属关系与 strong 类似。然而设置方法并不保留新值,而是将其“拷贝” (copy)。 当属性类型为 NSString 时,经常用此特质来保护其封装性,因为传递给设置方法的新值有可能指向一个 NSMutableString 类的实例。这个类是 NSString 的子类,表示一种可修改其值的字符串,此时若是不拷贝字符串,那么设置完属性之后,字符串的值就可能会在对象不知情的情况下遭人更改。所以,这时就要拷贝一份“不可变” (immutable)的字符串,确保对象中的字符串值不会无意间变动。只要实现属性所用的对象是“可变的” (mutable),就应该在设置新属性值时拷贝一份。

用 @property 声明 NSString、NSArray、NSDictionary 经常使用 copy 关键字,是因为他们有对应的可变类型:NSMutableString、NSMutableArray、NSMutableDictionary,他们之间可能进行赋值操作,为确保对象中的字符串值不会无意间变动,应该在设置新属性值时拷贝一份。

@property (nonatomic, strong) NSString => @property (nonatomic, copy ) NSString

1.13 afn 增加formData, 请求方法method和poporAFN中的一致, 但是pod不支持直接使用, 所以重新命名了一套变量

1.14 更新请求接口UI

1.15 列表页可以修改转发参数, 不再强制要求跳转到额外设置页面.

1.17 点击列表记录增加了一个绿色圆点

2.2 增加了网络死循环/超高频率请求的检测

[PoporNetRecord watchRequestRate:2 exception:^(CGFloat currentPerSecond, CGFloat maxPerSecond) {
    NSLog(@"❌❌❌ 网络请求死循环监测 ❌❌❌");
}];

Author

popor, 908891024@qq.com

License

PoporNetRecord is available under the MIT license. See the LICENSE file for more info.

Copyright (c) 2018 popor <908891024@qq.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Objective-C 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/popor/PoporNetRecord.git
git@gitee.com:popor/PoporNetRecord.git
popor
PoporNetRecord
PoporNetRecord
master

搜索帮助