🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-iot-wifi

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-iot-wifi

Connect to WiFi with React Native on Android and iOS.

0.3.0
Source
npm
Version published
Weekly downloads
135
16.38%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-iot-wifi

Wifi configuration. This library was written to config iot devices. With iOS 11 Apple introduced NEHotspotConfiguration class for wifi configuration. Library supports same functionality on ios and android.

0.3.0

  • connectSecure() now works
  • getSSID() should work on android

iOS

Important IOTWifi uses NEHotspotConfigurationManager. To use the NEHotspotConfigurationManager class, you must enable the Hotspot Configuration capability in Xcode.

  • Drang an drop IOTWifi.xcodeproj to your workspace
  • Link target to libIOTWifi.a library
  • Link target to NetworkExtension.framework framework
  • Enable Hotspot Configuration
  • For iOS 12 Enable Access WiFi Information

android

Usage

import Wifi from "react-native-iot-wifi";

Wifi.isAvaliable((avaliable) => {
  console.log(avaliable ? 'avaliable' : 'failed');
});

Wifi.getSSID((SSID) => {
  console.log(SSID);
});

Wifi.connect("wifi-name", (error) => {
  console.log(error ? 'error: ' + error : 'connected to wifi-name');
});

Wifi.removeSSID("wifi-name", (error)=>{
  console.log(error ? 'error: ' + error : 'removed wifi-name');
});

Keywords

react-native

FAQs

Package last updated on 17 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts