This commit is contained in:
max-mironov
2017-10-25 10:40:49 +03:00

View File

@@ -109,6 +109,20 @@ This change configures your app to always load the most recent version of your a
Typically, you're only going to want to use CodePush to resolve your JS bundle location within release builds, and therefore, we recommend using the `DEBUG` pre-processor macro to dynamically switch between using the packager server and CodePush, depending on whether you are debugging or not. This will make it much simpler to ensure you get the right behavior you want in production, while still being able to use the Chrome Dev Tools, live reload, etc. at debug-time.
For React Native 0.49 and above:
```objective-c
NSURL *jsCodeLocation;
#ifdef DEBUG
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios&dev=true"];
#else
jsCodeLocation = [CodePush bundleURL];
#endif
```
For React Native 0.48 and below:
```objective-c
NSURL *jsCodeLocation;