From ec149b6d767bacb2f77e032d116fdee75907e62c Mon Sep 17 00:00:00 2001 From: Alexander Goncharov Date: Tue, 12 Feb 2019 11:49:39 +0300 Subject: [PATCH] Replaced new jsCodeLocation in docs (#1522) --- docs/setup-ios.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/setup-ios.md b/docs/setup-ios.md index b49231c..fb206e1 100644 --- a/docs/setup-ios.md +++ b/docs/setup-ios.md @@ -100,7 +100,7 @@ Once your Xcode project has been setup to build/link the CodePush plugin, you ne 2. Find the following line of code, which loads your JS Bundle from the app binary for production releases: ```objective-c - jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; ``` 3. Replace it with this line: @@ -121,7 +121,7 @@ For React Native 0.49 and above: NSURL *jsCodeLocation; #ifdef DEBUG - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios&dev=true"]; + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else jsCodeLocation = [CodePush bundleURL]; #endif