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
Copy file name to clipboardExpand all lines: README.md
+43-8Lines changed: 43 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,31 @@ Add the following line to the end of the file.
169
169
}
170
170
```
171
171
172
-
### 4. "CodePush-ify" Your App
172
+
### 4. Expo Setup
173
+
For Expo projects, you can use the automated config plugin instead of manual setup.
174
+
175
+
**Add plugin to your Expo configuration:**
176
+
```js
177
+
// app.config.js
178
+
exportdefault {
179
+
expo: {
180
+
plugins: ["@bravemobile/react-native-code-push"],
181
+
},
182
+
};
183
+
```
184
+
185
+
**Run prebuild to apply changes:**
186
+
```bash
187
+
npx expo prebuild
188
+
```
189
+
190
+
> [!NOTE]
191
+
> The plugin automatically handles all native iOS and Android code modifications. No manual editing of AppDelegate, MainApplication, or gradle files is required.
192
+
193
+
**Requirements**
194
+
Expo SDK: 50.0.0 or higher
195
+
196
+
### 5. "CodePush-ify" Your App
173
197
174
198
The root component of your app should be wrapped with a higher-order component.
175
199
@@ -213,7 +237,7 @@ export default CodePush({
213
237
> The URL for fetching the release history should point to the resource location generated by the CLI tool.
214
238
215
239
216
-
#### 4-1. Telemetry Callbacks
240
+
#### 5-1. Telemetry Callbacks
217
241
218
242
Please refer to the [CodePushOptions](https://github.com/Soomgo-Mobile/react-native-code-push/blob/f0d26f7614af41c6dd4daecd9f7146e2383b2b0d/typings/react-native-code-push.d.ts#L76-L95) type for more details.
219
243
-**onUpdateSuccess:** Triggered when the update bundle is executed successfully.
@@ -223,7 +247,7 @@ Please refer to the [CodePushOptions](https://github.com/Soomgo-Mobile/react-nat
223
247
-**onSyncError:** Triggered when an unknown error occurs during the update process. (`CodePush.SyncStatus.UNKNOWN_ERROR` status)
224
248
225
249
226
-
### 5. Configure the CLI Tool
250
+
### 6. Configure the CLI Tool
227
251
228
252
> [!TIP]
229
253
> For a more detailed and practical example, refer to the `CodePushDemoApp` in `example` directory. ([link](https://github.com/Soomgo-Mobile/react-native-code-push/tree/master/Examples/CodePushDemoApp))
@@ -338,7 +362,7 @@ Create a new release history for a specific binary app version.
338
362
**Example:**
339
363
- Create a new release history for the binary app version `1.0.0`.
Copy file name to clipboardExpand all lines: cli/commands/releaseCommand/index.js
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ program.command('release')
7
7
.description('Deploys a new CodePush update for a target binary app.\nAfter creating the CodePush bundle, it uploads the file and updates the ReleaseHistory information.\n`bundleUploader`, `getReleaseHistory`, and `setReleaseHistory` functions should be implemented in the config file.')
8
8
.requiredOption('-b, --binary-version <string>','(Required) The target binary version')
9
9
.requiredOption('-v, --app-version <string>','(Required) The app version to be released. It must be greater than the binary version.')
10
+
.addOption(newOption('-f, --framework <type>','framework type (expo)').choices(['expo']))
* @param sourcemapOutput {string} Path to output sourcemap file (Warning: if sourcemapOutput points to the outputPath, the sourcemap will be included in the CodePush bundle and increase the deployment size)
0 commit comments