search

Home  >  Q&A  >  body text

react-native - ios模拟机下能够获取ssid吗?

ios的模拟器里,
我使用react-native-network-info 包,根据示例:

// require module
var NetworkInfo = require('react-native-network-info');

// Get SSID
NetworkInfo.getSSID(ssid => {
  console.log(ssid);
});

// Get Local IP
NetworkInfo.getIPAddress(ip => {
  console.log(ip);
});

我能够获取到ip,但是ssid获取不到,是因为在模拟器里的原因吗?如果能获取到的话,是我电脑wifi的ssid吗?

迷茫迷茫2771 days ago551

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-18 09:46:30

    The simulator will not work, you need a real iOS device to get it.

    Reference:
    https://github.com/pusherman/...
    http://stackoverflow.com/ques...

    reply
    0
  • Cancelreply