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
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,30 @@ The following changes are optional but recommended for cleaning up the old confi
35
35
npm install @bravemobile/react-native-code-push
36
36
```
37
37
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
+
exportdefault {
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
39
62
40
63
#### (1) Install CocoaPods Dependencies
41
64
@@ -110,7 +133,7 @@ Then, edit `AppDelegate.swift` like below.
110
133
```
111
134
112
135
113
-
### 3. Android Setup
136
+
### 4. Android Setup
114
137
115
138
#### (1) Edit `android/app/build.gradle`
116
139
@@ -161,7 +184,7 @@ Add the following line to the end of the file.
161
184
}
162
185
```
163
186
164
-
### 4. "CodePush-ify" Your App
187
+
### 5. "CodePush-ify" Your App
165
188
166
189
The root component of your app should be wrapped with a higher-order component.
167
190
@@ -205,7 +228,7 @@ export default CodePush({
205
228
> The URL for fetching the release history should point to the resource location generated by the CLI tool.
206
229
207
230
208
-
#### 4-1. Telemetry Callbacks
231
+
#### 5-1. Telemetry Callbacks
209
232
210
233
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.
211
234
-**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
215
238
-**onSyncError:** Triggered when an unknown error occurs during the update process. (`CodePush.SyncStatus.UNKNOWN_ERROR` status)
216
239
217
240
218
-
### 5. Configure the CLI Tool
241
+
### 6. Configure the CLI Tool
219
242
220
243
> [!TIP]
221
244
> 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))
0 commit comments