blackdeve / react-native-wifi

A react-native implementation for viewing and connecting to Wifi networks on Android and iOS devices.
76 stars 89 forks source link

Imported asset WifiManager is null #29

Open deadventures opened 5 years ago

deadventures commented 5 years ago

I installed with npm and linked with react-native link but the imported asset I get is always null. Is there something wrong with my setup or something I'm not doing correctly?

This is the exact error

TypeError: null is not an object (evaluating '_reactNativeWifi.default.connectToProtectedSSID')

For clarity, I am using Expo and this is my process:

  1. expo init project-name
  2. cd project-name
  3. npm i react-native-wifi
  4. react-native link react-native-wifi
  5. [add example code from README to expo App.js]
  6. expo start

At that point it fails on the connectToProtectedSSID() method with the error stated above.