【问题标题】:reachabilityWithHostname return YES only once可达性WithHostname 只返回一次
【发布时间】:2015-01-11 22:07:26
【问题描述】:

我在github上下载了项目可达性:https://github.com/tonymillion/Reachability

我在 ios7 和 ios8 上具有相同的行为(模拟器上的所有设备)。

使用 wifi 启动模拟器后打开计算机,我得到了。 reachabilityWithHostname 返回 Yes 并表明 google 是可访问的并且没问题。

但是当我关闭计算机上的 wifi 时,reachabilityWithHostname 表明 Google 无法访问这是正常的但是当我再次打开 wifi 时,我无法使用reachabilityWithHostname 工作,这表明 Google 无法访问。 当我启动模拟器并首先在我的计算机上关闭 wifi 时,同样的事情会附加,reachabilityWithHostname 始终表明 google 无法访问并保持不变

【问题讨论】:

标签: ios reachability


【解决方案1】:

这是 xCode 6 中模拟器的一个众所周知的错误。

在您的设备上以调试模式尝试相同的操作。它应该像我的情况一样正常工作。

我还建议使用original version of Reachability from Apple

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多