Reputation: 13262
I've been working on an app in React Native, using Expo to see my work. I'm about to go somewhere with no reliable wifi and I want to know if there's a way to work on my app and see my results in Expo (or elsewhere perhaps) without internet. I've seen a few things online about offline support but I'm not sure they're talking about what I'm looking for (I'm not looking to distribute my app to anyone, I'm just working on it in early development).
Thanks.
Upvotes: 7
Views: 13347
Reputation: 527
To run Expo app completely offline (with your phone's wifi off), you need to do the following, Connect your device via USB to your computer. For Android setup ADB and confirm device is connected, (do the same equivalent for iOS). Once the device is connected
Start the expo on localhost using npx expo start --localhost
and then select your device and now it should work completely offline
Upvotes: 0
Reputation: 54
You can launch the server without internet by using npx expo start --offline
. But to use Expo Go app you will need internet connection. So the remaining option is to use local emulator or web to test your app. For more info use on CLI npx expo start -h
.
Upvotes: 0
Reputation: 1133
Local can be used when you only want to test the app on an emulator. As soon as you want to test your app on a real device you have to select LAN (or Tunnel).
Another option is USB debugging with real devices.
Upvotes: 3
Reputation: 13262
I've figured this out: on the browser page that launches when you run expo start
, there's a control for "Connection". Switch it to "Local" for web-less developing!
Upvotes: 0
Reputation: 2283
Either you can eject the project and enable USB debugging to launch or you simply create a hotspot with your laptop to connect with mobile if you are using Expo.
Upvotes: 1