Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 59a19b3

Browse files
almostintuitiveMax
authored andcommitted
fix(Documentation): correct url for RN 0.49 and up (#1052)
1 parent c43b0b1 commit 59a19b3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/setup-ios.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,20 @@ This change configures your app to always load the most recent version of your a
109109
110110
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.
111111
112+
For React Native 0.49 and above:
113+
114+
```objective-c
115+
NSURL *jsCodeLocation;
116+
117+
#ifdef DEBUG
118+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios&dev=true"];
119+
#else
120+
jsCodeLocation = [CodePush bundleURL];
121+
#endif
122+
```
123+
124+
For React Native 0.48 and below:
125+
112126
```objective-c
113127
NSURL *jsCodeLocation;
114128

0 commit comments

Comments
 (0)