Giter Club home page Giter Club logo

react-native-iot-wifi's Introduction

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.

1.0.0

  • Optional Force binding to a Wifi on both iOS and Android platforms
  • Android: Better error handling
  • Android: Detection for a system added config which cant be reused, removed or updated
  • Android: Reliable polling for requested network connection for callbacks
  • It does do a lot of other cleanup and re-use of code

0.4.5

Android:

  • Makes the connect call asynchronous on Android
  • Fails for Android Q as the API is deprecated

iOS:

  • Fixes APIs on Simulator as it was behind a compile time macro
  • Exposed and returns defaults for Simulator targets

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.

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

android

Usage

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

Wifi.isApiAvailable((available) => {
  console.log(available ? 'available' : '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');
});

lol

react-native-iot-wifi's People

Contributors

edpaget avatar tadasr avatar tonygentilcore avatar waltershub avatar wohaoshuai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.