Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@josectobar/react-native-iot-wifi
Advanced tools
Readme
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.
Android: Added build gradle compatibility.
.gradlew assembleRelease
.Android: Added forceWifiUsage
method. to use this method, do the following steps:
Android/app/src/main/res/xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">YOUR DEVICE URL(i.e. 10.0.0.1)</domain>
</domain-config>
</network-security-config>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />
<application
...
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
...>
...
</application>
</manifest>
wifi connection was dropping after a few seconds after connecting, this seems to occur only to devices using iOS 13. As a fix I changed the configuration.joinOnce = false; for the connect and connectSecure methods this change will maintain the connection to the wifi network even after the app is closed or on the background. this may not be ideal for certain use cases.
I tested the library with RN v 0.61.2 for both iOS and Android and was able to fix conflicts related to the dependencies and auto linking with iOS.
Added error handling for iOS wifi connection failure.
Added podspec for RN 6.1.2 compatibility.
Android:
iOS:
connectSecure()
now worksgetSSID()
should work on androidImportant IOTWifi uses NEHotspotConfigurationManager. To use the NEHotspotConfigurationManager class, you must enable the Hotspot Configuration capability in Xcode.
IOTWifi.xcodeproj
to your workspacelibIOTWifi.a
libraryNetworkExtension.framework
frameworkHotspot Configuration
Access WiFi Information
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");
});
FAQs
Connect to WiFi with React Native on Android and iOS.
The npm package @josectobar/react-native-iot-wifi receives a total of 14 weekly downloads. As such, @josectobar/react-native-iot-wifi popularity was classified as not popular.
We found that @josectobar/react-native-iot-wifi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.