Socket
Socket
Sign inDemoInstall

react-native-ios-wifi

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-ios-wifi

Experimental implementation of automatically connecting to protected WiFi from a react native app. This version supports pod install and is compatible with react-native 0.60 and above


Version published
Weekly downloads
7
increased by250%
Maintainers
1
Install size
49.6 kB
Created
Weekly downloads
 

Readme

Source

react-native-ios-wifi

Experimental implementation of automatically connecting to protected WiFi from a react native app. This version supports pod install and is compatible with react-native 0.60 and above

Getting started

$ npm install react-native-ios-wifi --save

Mostly automatic installation

$ react-native link react-native-ios-wifi $ cd ios $ pod install

Manual installation

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-ios-wifi and add IosWifi.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libIosWifi.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Usage


import WifiManager from 'react-native-wifi';

// Call this method to automatically connect to WiFi with password
try{
    await WifiManager.connectToProtectedSSID(ssid, password, isWep);
}catch (error) {
    console.log("Unable to connect" + error.message);
}

// Call this method to automatically connect to WiFi without password
try{
    await WifiManager.connectToSSID(ssid);
}catch (error) {
    console.log("Unable to connect" + error.message);
}

// Call this method to automatically disconnect from a given WiFi
try{
    await WifiManager.disconnectFromSSID(ssid);
}catch (error) {
    console.log("Unable to disconnect" + error.message);
}

// Call this method to fetch current WiFi details
try{
    const wifiDetails = await WifiManager.getCurrentWifiSSID(ssid);
}catch (error) {
    console.log("Unable to fetch WiFi details" + error.message);
}

Keywords

FAQs

Last updated on 18 Nov 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc