Accessing prototype in Expo app whilst offline

Hey folks :wave:

I’m looking to setup my app to handle when the user is offline (so cache content etc).

I know of the --offline flag but from what I’ve read that’s not actually for testing with the app with no connectivity.

Is there any solution to this without needing to publish to Expo? Publishing to Expo is really not ideal as (in my understanding) that will update all of our existing users code on TestFlight, and is quite a time intensive process for every little change.

Here’s the latest info I’m aware of: Developer workflow for offline support | Voters | Expo

I’m surprised if that’s the best we have now, as this seems like such a core part of every app development workflow.

Is there a way for me to access my app whilst offline and in standard development mode, with it being served from my computer, to my physical device? (e.g. plugging it in?)

Cheers :raised_hands:

You can publish code to another release channel - that way the update will not be delivered to your users (which are in the other release channel).

1 Like

That’s a good point, thanks @jakubste. Not ideal to need to publish up each time (and turn internet on and off), but sounds like the best workflow for now until there’s a way for local offline dev with the Expo app.

If you only want to develop with your phone while being offline (not connected to internet) you could setup your environment so that your phone and a computer is connected to same wifi connection (that is not connected to outside world) and use exp start --lan. If you want to have Internet on your computer and not your phone that method would require slighlty sophisticated router setup (passes WAN to PC, but not to phone) or another connection (ex. Ethernet or plugged in card) to your laptop.

I believe that your situation is somehow rare and most people develop with active connection, so it requires some work to be done :wink:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.