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

[Question] - Running app without ngrok tunnel #44

Closed
dittmarconsulting opened this issue Oct 11, 2017 · 6 comments
Closed

[Question] - Running app without ngrok tunnel #44

dittmarconsulting opened this issue Oct 11, 2017 · 6 comments

Comments

@dittmarconsulting
Copy link

Hi @achuvm,

Another question.

Is it possible to run the Viro library without ngrok at all?

Thanks,
Tom

@dittmarconsulting dittmarconsulting changed the title [Question] - Running up without ngrok tunnel [Question] - Running app without ngrok tunnel Oct 11, 2017
@achuvm
Copy link
Collaborator

achuvm commented Oct 11, 2017

Hi @dittmarconsulting,

Yes, it's possible to run Viro w/o ngrok.

If you're using the Viro Media App:
On iOS:

  1. If your phone and computer are on the same network, you can type in your local IP address.

On Android:

  1. You can also use your local IP address.
  2. You can reverse tether using the command adb reverse tcp:8081 tcp:8081 and simply use the localhost address: 127.0.0.1 in the Viro Media App.

If you're building your app through Xcode:

  1. in AppDelegate.m, change the line BOOL usingNgrok = YES; to BOOL usingNgrok = NO;, this will default to using local IP (this is automatically detected and "sent" to the built app).

If you're building your app through Android Studio:

  1. You should reverse tether using the command adb reverse tcp:8081 tcp:8081 and simply build and run the application.

Let me know if you need help or more clarification!

Andy

@dittmarconsulting
Copy link
Author

Thank you very much for the fast reply.

I was after the Xcode switch but I'm sure others will be interested in the other solutions as well.

It's especially important to turn off the tunnel to enable remote debugging unless that's possible with ngrok.

Thanks again,
Tom

@mypark
Copy link

mypark commented Mar 29, 2018

I'm assuming that ngrok will not on release/production builds - how is that configuration handled? Is that in the docs somewhere?

@achuvm
Copy link
Collaborator

achuvm commented Mar 29, 2018

Hi @mypark,

The use of a packager server vs bundled Javascript assets is a feature of React Native. We just added the ngrok bit to overcome a few issues, but the deployment/release process is the same as React Native.

Instructions for Android can be found here:
https://facebook.github.io/react-native/docs/signed-apk-android.html

iOS:
I can't find the instructions for iOS, but they're the same as any other iOS app out there, simply change the Scheme's Build Configuration to Release:
https://stackoverflow.com/questions/5706548/how-do-i-create-a-release-build-in-xcode

Let us know if you have any issues

@Mrashes
Copy link

Mrashes commented Oct 14, 2018

Hi @achuvm,

Following up on this, if I want to locally distribute (ios) to coworkers without use of the apple appstore, am I unable to do so without an ngrok or local setup constantly running?

Update: forgot hello

@achuvm
Copy link
Collaborator

achuvm commented Oct 15, 2018

Hey @Mrashes,

You should be able to perform a release build by clicking on the scheme -> Edit Schemes... -> Run -> Build Configuration -> Release. See the image below for reference.

Keep in mind you will need to do this for the React library as well as the ViroReact library before building your app too.

Let us know if you have any issues with that!

screen shot 2018-10-15 at 10 24 45 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants