Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit ec149b6

Browse files
Replaced new jsCodeLocation in docs (microsoft#1522)
1 parent effa429 commit ec149b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/setup-ios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Once your Xcode project has been setup to build/link the CodePush plugin, you ne
100100
2. Find the following line of code, which loads your JS Bundle from the app binary for production releases:
101101
102102
```objective-c
103-
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
103+
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
104104
```
105105
106106
3. Replace it with this line:
@@ -121,7 +121,7 @@ For React Native 0.49 and above:
121121
NSURL *jsCodeLocation;
122122
123123
#ifdef DEBUG
124-
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios&dev=true"];
124+
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
125125
#else
126126
jsCodeLocation = [CodePush bundleURL];
127127
#endif

0 commit comments

Comments
 (0)