如何从使用 Expo 和 React Native 构建的应用程序连接到 SSID? [英] How to connect to an SSID from an app built with Expo and React Native?

查看:13
本文介绍了如何从使用 Expo 和 React Native 构建的应用程序连接到 SSID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want my app to be able to connect to a Wifi network whose SSID and password are already gonna be hardcoded in the app. Hope there is a way to do this in expo. I know I could use something like https://www.npmjs.com/package/react-native-wifi-reborn but probably do not want to eject out of expo.

解决方案

Answering my own question here for anyone who's facing the same problem. With the latest Expo updates now we can add react-native packages to the managed expo workflow without ever ejecting. What that means is we can install https://www.npmjs.com/package/react-native-wifi-reborn to our Expo project.

We'll just be needing to install expo-dev-client to our project and then use EAS build. Consider reading this guide to follow the exact steps needed https://docs.expo.dev/development/getting-started/

Here is a little blog post I wrote discussing about the same. https://blog.chiragsrvstv.dev/install-native-modules-with-expo

这篇关于如何从使用 Expo 和 React Native 构建的应用程序连接到 SSID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆