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

Commit 3157b76

Browse files
author
Will Anderson
committed
Add installation instructions to readme
1 parent 6b7b311 commit 3157b76

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
1-
code-push-react-native
1+
react-native-code-push
22
===
33

4-
React Native module for deploying script updates
4+
React Native module for deploying script updates using the Code Push service.
5+
6+
Installation
7+
---
8+
9+
```
10+
npm install --save react-native-code-push
11+
```
12+
13+
After installing the React Native Code Push plugin, open your project in Xcode. Open `node_modules/react-native-code-push` in Finder, and drag the `CodePush.xcodeproj` into the Libraries folder of Xcode.
14+
15+
In Xcode, click on your project, and select the "Build Phases" tab of your project configuration. Drag libCodePush.a from `Libraries/CodePush.xcodeproj/Products` into the "Link Binary With Libraries" secton of your project's "Build Phases" configuration.
16+
17+
Finally, edit your project's `AppDelegate.m`. Find the following code:
18+
19+
```
20+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
21+
```
22+
23+
Replace it with the following:
24+
25+
```
26+
jsCodeLocation = [CodePush getBundleUrl];
27+
```
28+
29+
This change allows Code Push to load the updated app location after an update has been applied.
530

631
Running the Example
732
---
833

9-
* Make sure you have https://github.com/Microsoft/hybrid-mobile-deploy cloned beside the react-native project in a folder called `website`. This is hacky, and will be cleaned up as soon as React Native's packager supports symlinks.
10-
* Start the CodePush server with `gulp serve`, after installing the prerequisites described in the [project readme](https://github.com/Microsoft/hybrid-mobile-deploy/blob/master/README.md)
34+
* Clone this repository
1135
* From the root of this project, run `npm install`
1236
* `cd` into `Examples/CodePushDemoApp`
1337
* From this demo app folder, run `npm install`
14-
* Open `Info.plist` and fill in the values for CodePushDeploymentKey and CodePushServerUrl
38+
* Open `Info.plist` and fill in the value for CodePushDeploymentKey
1539
* Run `npm start` to launch the packager
1640
* Open `CodePushDemoApp.xcodeproj` in Xcode
1741
* Launch the project
@@ -22,4 +46,4 @@ Running Tests
2246
* Open `CodePushDemoApp.xcodeproj` in Xcode
2347
* Navigate to the test explorer (small grey diamond near top left)
2448
* Click on the 'play' button next to CodePushDemoAppTests
25-
* After the tests are completed, green ticks should appear next to the test cases to indicate success
49+
* After the tests are completed, green ticks should appear next to the test cases to indicate success

0 commit comments

Comments
 (0)