How can I run my responsive application on a device outside my home network?

Now I can successfully launch the application configured to respond on the device (iPhone / iOS). However, I must be connected to my WIFI to work (no need to connect USB). When I disconnect from my WIFI, the application no longer works on the phone. It does not load properly / crash. Is there a way to run a reaction-based application on a device outside of my home / wi-fi network?

+5
source share
1 answer

If you use action-native 0.29.0 or higher, you can simply change the scheme to β€œrelease” and it should create a standalone bundle of your application, so you can use it without being on your Wi-Fi.

If you use response-native 0.28.0 or lower, you still need to change the schema to "release", but you also need to change the code in the AppDelegate.m file:

Comment this line:

 jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; 

And then uncomment this line:

 jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 

This puts your application in Production mode, so you won’t be able to access the debug menu.

Hope this helps! :)

+8
source

All Articles