You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+29-3Lines changed: 29 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The CodePush plugin helps get product improvements in front of your end-users in
17
17
- iOS
18
18
- Android
19
19
20
-
*Note: CodePush now requires v0.14.0+ of React Native.*
20
+
*Note: CodePush v1.3.0 requires v0.14.0+ of React Native, and CodePush v1.4.0 requires v0.15.0+ of React Native, so make sure you are using the right version of the CodePush plugin.*
21
21
22
22
## Getting Started
23
23
@@ -41,7 +41,13 @@ Once you've acquired the CodePush plugin, you need to integrate it into the Xcod
41
41
42
42

43
43
44
-
5. Under the "Build Settings" tab of your project configuration, find the "Header Search Paths" section and edit the value.
44
+
5. Click the plus sign underneath the "Link Binary With Libraries" list and select the `libz.tbd` library underneath the `iOS 9.1` node.
@@ -182,7 +188,27 @@ Once your app has been configured and distributed to your users, and you've made
182
188
1. Execute `react-native bundle` in order to generate the updated JS bundle for your app.
183
189
2. Execute `code-push release <appName> <jsBundleFilePath> <appVersion> --deploymentName <deploymentName>` in order to publish the generated JS bundle to the server. Assuming your CWD is the root directory of your React Native app, `<jsBundleFilePath>` could be `iOS/main.jsbundle` for iOS, or `android/app/src/main/assets/index.android.jsbundle` for Android.
184
190
185
-
And that's it! For more information regarding the CodePush API, including the various options you can pass to the `sync` method, refer to the reference section below. Additionally, for more information regarding the CLI and how the release (or promote) commands work, refer to it's [documentation](http://microsoft.github.io/code-push/docs/cli.html).
191
+
And that's it! For more information regarding the CodePush API, including the various options you can pass to the `sync` method, refer to the reference section below. Additionally, for more information regarding the CLI and how the release (or promote and rollback) commands work, refer to the [documentation](http://microsoft.github.io/code-push/docs/cli.html).
192
+
193
+
## Releasing asset updates - iOS
194
+
195
+
If you are using the new React Native [assets system](https://facebook.github.io/react-native/docs/images.html#content), as opposed to loading your images from the network and/or platform-specific mechanisms (e.g. iOS asset catalogs), then you can't simply pass your jsbundle to CodePush as demonstrated above. You need to provide your images as well. To do this, simply use the following workflow:
196
+
197
+
1. When calling `react-native bundle`, specify that your assets and JS bundle go into a new "release" folder (you can call this anything, but it shouldn't contain any other files). For example:
198
+
199
+
```
200
+
react-native bundle \
201
+
--platform ios \
202
+
--entry-file index.ios.js \
203
+
--bundle-output ./release/main.jsbundle \
204
+
--assets-dest ./release
205
+
```
206
+
207
+
2. Execute `code-push release`, passing the path to the directory you used in #1 as the "package" parameter (e.g. `code-push release Foo ./release 1.0.0`). The code-push CLI will automatically handle zipping up the contents for you, so don't worry about handling that yourself.
208
+
209
+
Additionally, the CodePush client supports differential updates, so even though you are releasing your JS bundle and assets on every update, your end-users will only actually download the files they need. The service handles this automatically so that you can focus on creating awesome apps and we can worry about optimizing end-user downloads.
210
+
211
+
*Note: Releasing assets via CodePush is currently only supported on iOS, and requires that you're using React Native v0.15.0+.*
0 commit comments