Skip to content

Commit

Permalink
perf(Administration): Rename project
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanSe Dussan authored and JuanSe Dussan committed Oct 24, 2019
1 parent 40201f7 commit 241bf89
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 84 deletions.
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log


# Xcode
#
build/
*.pbxuser
!default.pbxuser∂
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace


# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# BUCK
buck-out/
\.buckd/
*.keystore
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.github/
example/
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

# react-native-wifi
# react-native-wifi-reborn

This project is based on (https://github.com/robwalkerco/react-native-wifi)

## Getting started

`$ npm install react-native-wifi --save`
`$ npm install react-native-wifi-reborn --save`

### Mostly automatic installation
### Mostly automatic installation RN <0.59

`$ react-native link react-native-wifi`
`$ react-native link react-native-wifi-reborn`

### [IOS] IMPORTANT NOTE:

Expand All @@ -34,18 +36,18 @@ You need put "Privacy - Location When In Use Usage Description" or "Privacy - Lo
- Add `new RNWifiPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-wifi'
project(':react-native-wifi').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wifi/android')
include ':react-native-wifi-reborn'
project(':react-native-wifi-reborn').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-wifi/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
implementation project(':react-native-wifi')
implementation project(':react-native-wifi-reborn')
```


## Usage
```javascript
import WifiManager from 'react-native-wifi';
import WifiManager from 'react-native-wifi-reborn';

WifiManager.connectToProtectedSSID(ssid, password, isWep)
.then(() => {
Expand Down
6 changes: 4 additions & 2 deletions exapmle/AwesomeProject/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ import {
} from 'react-native';

import {Header, Colors} from 'react-native/Libraries/NewAppScreen';
import WifiManager from 'react-native-wifi';
import WifiManager from 'react-native-wifi-reborn';

const App = () => {
const [connected, setConneted] = useState({connected: false, ssid: ''});
const [connected, setConneted] = useState({connected: false, ssid: 'S4N'});
const [ssid, setSsid] = useState('');
const password ="secret-secret";
const isWep = false;

const wifi = async () => {
try {
Expand Down
Loading

0 comments on commit 241bf89

Please sign in to comment.