Comments (6)
可能是偶现的ping失败
from realreachability.
/// Please make sure this host is available for pinging! default host:www.baidu.com
@Property (nonatomic, copy) NSString *hostForPing;
default host改为了www.apple.com,日志却没有改,其实API本身默认就是www.apple.com,但是有个问题,国内访问就很不稳定
from realreachability.
您好,有个问题请教一下:我直接下载的最新demo,然后将最新的RealReachability文件夹集成到我的项目中,但是一楼的问题还是有,我在 appdelegate.m 中添加的检测网络状况变化的通知,测试环境是:真机测试,iphone6Plus,ios9.2.
测试流程是:第一次是wifi状态,然后断网,接着连接wifi,换成4G,接着断网,最后换成4G,curStateID输出结果如下:
2016-08-16 16:32:04.969 YQVehicleLoan[23319:5381539] curStateID is 3
2016-08-16 16:32:05.003 YQVehicleLoan[23319:5381539] curStateID is 3
2016-08-16 16:32:05.004 YQVehicleLoan[23319:5381539] curStateID is 3
2016-08-16 16:32:15.642 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:32:17.205 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:32:24.615 YQVehicleLoan[23319:5381539] curStateID is 3
2016-08-16 16:32:24.807 YQVehicleLoan[23319:5381539] curStateID is 3
2016-08-16 16:32:28.871 YQVehicleLoan[23319:5381539] curStateID is 4
2016-08-16 16:32:30.657 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:32:30.657 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:34:17.613 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:35:52.653 YQVehicleLoan[23319:5381539] curStateID is 2
2016-08-16 16:36:02.214 YQVehicleLoan[23319:5381539] curStateID is 4
2016-08-16 16:36:04.218 YQVehicleLoan[23319:5381539] curStateID is 2
这是为什么呢?导入的RealReachability文件夹是最新的吧?还是需要用cocoapod导入才是最新的版本啊?麻烦帮忙看看,谢谢了。
from realreachability.
这个我感觉可能是数据网络质量比较差造成了ping失败导致的现象。如果不需要检测弱网络可以用
pod 'RealReachability/Connection' 检测本地连接状态 @kanshaoting
from realreachability.
好的,谢谢您的回答。
from realreachability.
master上的最新版本引入了double check机制,可以设置两个ping地址,通过双地址+重试来保证可靠性,欢迎体验,谢谢~
from realreachability.
Related Issues (20)
- tag 1.3.0 podspec内的版本号却是1.2.2 HOT 6
- l;。‘了解客户广泛的AL;.’
- 移动4G网络状态下,断开网络连接再重新打开连接会先提示已连接然后出现未连接,然后一直连接不上,切后台回来可以更新 HOT 6
- 更新日志在哪里看? HOT 1
- 打开app时,打开APP,然后使用过程中断开连接的wifi的真实链接,2分钟一次的轮询检测不到。不发通知。
- RealReachability is not working on iPhone 6S with iOS 12.1.4
- Ping always fails in iOS 12 HOT 2
- RealReachability Crash SomeTimes
- RealReachability Crash SomeTimes HOT 7
- ping相关
- 获取蜂窝网络类型出错了,iOS12以上系统API更换了 HOT 17
- 请问如何测试带宽,上传和下载速度? HOT 1
- 请教作者是否遇到过如下问题 HOT 1
- 希望打一个新Tag HOT 1
- 5G not working HOT 3
- 没有实时更新网络状态 HOT 1
- 请问可以监控网络质量吗? HOT 1
- 从无网络或蜂窝数据切换到一个无网络的WiFi时会多一次RealStatusViaWiFi状态的调用
- Crash on PingFoundation dealloc HOT 2
- why pinging run with mainthread
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realreachability.