react-native-network-info无法在ios设备上捕获ip

时间:2017-03-14 09:31:26

标签: react-native

我已经使用了几个月了,但是现在我无法在iPhone上获取IP地址而且出现了“错误”。我不知道为什么。你知道吗?

NetworkInfo.getIPAddress(ip => {
  console.log(ip);
}

console.log =>错误

my react-native version:0.37。

1 个答案:

答案 0 :(得分:0)

尝试升级到react-native 0.40。如果无法做到这一点,请创建issue in Github

我是react-native-network-info的维护者 - 它在Github中更容易调试,因为我还没有确切的答案。