# 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

Latest version **1.0.11** (published 2019-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-ios-wifi
pnpm add react-native-ios-wifi
yarn add react-native-ios-wifi
bun add react-native-ios-wifi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2019-11-18 |
| First published | 2019-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 49.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shweta |
| Maintainers | shwetap |
| Keywords | react-native, ios, wifi, ssid, xcode, connect, react, network, connection, component |

## Links

- npm: https://www.npmjs.com/package/react-native-ios-wifi
- Repository: https://github.com/Shweta-Porwal/react-native-ios-wifi
- Homepage: https://github.com/Shweta-Porwal/react-native-ios-wifi#readme
- Issues: https://github.com/Shweta-Porwal/react-native-ios-wifi/issues
- npm.io page: https://npm.io/package/react-native-ios-wifi

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.11 (latest) — 2019-11-18
- 1.0.10 — 2019-11-01
- 1.0.9 — 2019-10-01
- 1.0.8 — 2019-10-01
- 1.0.7 — 2019-10-01
- 1.0.6 — 2019-10-01
- 1.0.5 — 2019-10-01
- 1.0.4 — 2019-10-01
- 1.0.3 — 2019-10-01
- 1.0.2 — 2019-10-01
- 1.0.1 — 2019-10-01
- 1.0.0 — 2019-10-01

## README

# 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 `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-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 Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<


## Usage
```javascript

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);
}
```

---
_Source: https://npm.io/package/react-native-ios-wifi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
