Skip to content
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

Offline use #55

Closed
hwaterke opened this issue Feb 6, 2017 · 7 comments
Closed

Offline use #55

hwaterke opened this issue Feb 6, 2017 · 7 comments

Comments

@hwaterke
Copy link

hwaterke commented Feb 6, 2017

According to the documentation, when the server is not reachable (for whatever reason) the app still starts by using the cached version of the app.

But as soon as I close my Exponent XDE, I'm unable to open the app on my phone.
It tries to connect to my local server and then either timeouts or complains about the tunnel being broken.

Am I missing something?
The idea is that I would like to use my app even when my server is down and without having to publish it to Exponent.

Thanks.

@terribleben
Copy link
Contributor

Hi, is there a reason you don't want to publish to Exponent? Publishing is the mechanism that solves your problem:

  1. It puts your JS bundle on our server so that all existing users of your app can get the newest version of your code.
  2. If you make a standalone app, it also rolls the JS bundle into your binary so the standalone app loads offline.

Even the standalone app will still continue fetching updates to your published JS when it has an internet connection. All versions of Exponent will cache the newest JS bundle so it's available next time they don't have an internet connection.

Serving from XDE is solely intended for development. When you're ready to share the app, that's what publishing is for. Hopefully that all makes sense.

@brentvatne
Copy link
Member

@hwaterke - you can also publish your app with the privacy setting "unlisted" - https://docs.getexponent.com/versions/v13.0.0/guides/configuration.html#privacy - and nobody will be able to find your app unless they know the URL (security by obscurity). At some point in the future we will also support entirely "private" apps, where you must be explicitly granted permission by the creator in order to use it, but we don't have that yet so "unlisted" is your best bet.

@johnsonthedev
Copy link

I share hwaterke's request. I also discovered that I need an active connection to Exponent servers. I understand the benefit of publishing the app to earlier testers in beta phase but I would prefer a pure offline experience during development. For now, I quit using exponent because of missing offline functionality.

@jesseruder
Copy link
Contributor

We support offline development with exp. Use exp start --offline

@theronic
Copy link

Please add something in the auth CLI output about the --offline switch, or if it could "just work" but warn about trying to go online instead of not starting.

I was bitten by this when I wanted to demo an Expo app during a design meeting, and the WiFi was spotty. I was unable to demo my app because Expo insists on logging in.

@abejfehr
Copy link

abejfehr commented Nov 27, 2017

This really sucks. I want to develop an app for personal use, not to distribute on the app store (at least, not yet). It's one that I'd like to be able to use independently of a computer, but there's seemingly no way I can package it for just my phone.

I tried exp build:ios but that doesn't work because I have 2FA enabled on my Apple ID. exp start --offline doesn't seem to load the app when my computer is off either.

Is there a way I can (preferably without authenticating anywhere) just build the app for personal use?

Edit: I just learned that exp detach is exactly what I was looking for. It generates project folders which can be open/built for offline use

@kevin-williams
Copy link

I wanted to work on my app offline on my laptop (actually in the car on 7 hr drives). I figured out a way to do it.

http://javascriptrambling.blogspot.com/2018/03/running-expo-offline.html

I actually use this on my desktop too as it eliminates some of the firewall issues I was experiencing because of our crazy network. I now only use Expo XDE to publish.

@lock lock bot added the outdated label Jun 15, 2019
@lock lock bot locked and limited conversation to collaborators Jun 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants