-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native Wifi reborn (WifiManager) issue on iOS (working fine on Android) #413
Comments
Try to upgrade to v4.13.0, that issue should be fixed already. Duplicate of #379 |
I am on 4.13.0 and it's still present there. Adding a 5th
The JSDoc conflicts with the docs (README) on this one I believe? vs.
from here? Have I misunderstood something or should I open a PR to update the docs @DavideViolante ? |
The readme was wrong due to this PR that introduced 2 very similar methods: #355 |
I am using the react-native-wifi-reborn library to connect to a Wifi Network from the App without going into Wifi Settings. The code is working fine on android but on IOS it gives an error:
" Argument 4 (NSNumber) of WifiManager.connectToProtectedSSID is marked as nullable but React requires that all NSNumber arguments are explicitly marked as nonnull to ensure compatibility with Android. "
`import React from 'react';
import {View, Text, Button, Alert, StyleSheet} from 'react-native';
import WifiManager from 'react-native-wifi-reborn';
const App = () => {
const ssid = '';
const password = '';
const connectToWifi = async () => {
await WifiManager.connectToProtectedSSID(ssid, password, false, true);
console.log(
Connected to Wi-Fi: ${ssid}
);};
return (
Connect to Local Network
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 20,
},
title: {
fontSize: 20,
fontWeight: 'bold',
marginBottom: 20,
},
});
export default App;
`
"react-native-wifi-reborn": "^4.12.1",
"react-native": "0.74.2",
The text was updated successfully, but these errors were encountered: