question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update instructions to run app on iOS device using offline bundle

See original GitHub issue

The instructions in the documentation to run the app on iOS device using an offline bundle says

Open ios/YourApp/AppDelegate.m Uncomment the line, jsCodeLocation = [[NSBundle mainBundle] …

Using latest version 0.30.0, such line is no longer present in the default AppDelegate.m file. Below is the excerpt from the default AppDelegate.m file

 NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"TestAppDelete"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];

If I try to copy over the line from an old application and use that, I see that jsCodeLocation is returned as null.

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

Have these instructions changed? What are the new instructions to run the app using an offline bundle?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:18
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
varungupta85commented, Aug 8, 2016

Refer to the accepted answer for this stackoverflow question. The instructions for running the app on the device have changed but they are yet to be updated on the documentation.

4reactions
PublicParadisecommented, Aug 23, 2016

Please raise the priority. The situation is pretty bad…

The current react-native documentation reads:

1. Open ios/YourApp/AppDelegate.m
2. Uncomment the line, jsCodeLocation = [[NSBundle mainBundle] ...

That’s inaccurate.

Apparently there is some hidden trick involving adding ip.txt to your XCode project: React Native 0.29+ without dev mode in iOS?

It’s also pretty unclear to me how one should integrate CodePush with RCTBundleURLProvider, see https://github.com/Microsoft/react-native-code-push/issues/393

Please update the documentation ASAP. Thx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update instructions to run app on iOS device using offline ...
Update instructions to run app on iOS device using offline bundle. Nicolas Charpentier. Moved from https://github.com/facebook/react-native/issues/9225.
Read more >
Running react-native app on iOS device using offline bundle
If you change to a release scheme while building your app, that will compile your app with the offline bundle. Product > Scheme...
Read more >
Enterprise Application on offline iOS devices - Apple Developer
You will have problems running an Enterprise App "permanently offline". The device must be able to to connect to Apple's servers (or perhaps...
Read more >
Running On Device - React Native
It's always a good idea to test your app on an actual device before releasing it to your users. This document will guide...
Read more >
Set up Office apps and email on a mobile device
Learn how to setup your mobile device with Office mobile apps and email.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found