Skip to content

Commit 38fd518

Browse files
committed
docs: add Expo plugin setup guide to installation section
1 parent 93c1091 commit 38fd518

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,30 @@ The following changes are optional but recommended for cleaning up the old confi
3535
npm install @bravemobile/react-native-code-push
3636
```
3737

38-
### 2. iOS Setup
38+
### 2. Expo Setup
39+
For Expo projects, you can use the automated config plugin instead of manual setup.
40+
41+
**Add plugin to your Expo configuration:**
42+
```js
43+
// app.config.js
44+
export default {
45+
expo: {
46+
plugins: ["@bravemobile/react-native-code-push"],
47+
},
48+
};
49+
```
50+
51+
**Run prebuild to apply changes:**
52+
```bash
53+
npx expo prebuild
54+
```
55+
56+
>[!NOTE] The plugin automatically handles all native iOS and Android code modifications. No manual editing of AppDelegate, MainApplication, or gradle files is required.
57+
58+
**Requirements**
59+
Expo SDK: 50.0.0 or higher
60+
61+
### 3. iOS Setup
3962

4063
#### (1) Install CocoaPods Dependencies
4164

@@ -110,7 +133,7 @@ Then, edit `AppDelegate.swift` like below.
110133
```
111134

112135

113-
### 3. Android Setup
136+
### 4. Android Setup
114137

115138
#### (1) Edit `android/app/build.gradle`
116139

@@ -161,7 +184,7 @@ Add the following line to the end of the file.
161184
}
162185
```
163186

164-
### 4. "CodePush-ify" Your App
187+
### 5. "CodePush-ify" Your App
165188

166189
The root component of your app should be wrapped with a higher-order component.
167190

@@ -205,7 +228,7 @@ export default CodePush({
205228
> The URL for fetching the release history should point to the resource location generated by the CLI tool.
206229
207230

208-
#### 4-1. Telemetry Callbacks
231+
#### 5-1. Telemetry Callbacks
209232

210233
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.
211234
- **onUpdateSuccess:** Triggered when the update bundle is executed successfully.
@@ -215,7 +238,7 @@ Please refer to the [CodePushOptions](https://github.com/Soomgo-Mobile/react-nat
215238
- **onSyncError:** Triggered when an unknown error occurs during the update process. (`CodePush.SyncStatus.UNKNOWN_ERROR` status)
216239

217240

218-
### 5. Configure the CLI Tool
241+
### 6. Configure the CLI Tool
219242

220243
> [!TIP]
221244
> 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))

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
"homepage": "https://microsoft.github.io/code-push",
88
"keywords": [
99
"react-native",
10+
"expo",
1011
"code",
11-
"push"
12+
"push",
13+
"code-push",
14+
"react-native-code-push",
15+
"expo-code-push"
1216
],
1317
"author": "Soomgo Mobile Team (originally Microsoft Corporation)",
1418
"license": "MIT",

0 commit comments

Comments
 (0)