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: content/rn-codepush/setup.md
+155-2Lines changed: 155 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ This section prepares a project to use CodePush with Codemagic. After completing
16
16
17
17
Codemagic hosts the CodePush server and developers interact with it using [access tokens](#get-an-access-token) and the CodePush CLI. If you want to learn about how OTA updates work, check out the [concepts page](https://docs.codemagic.io/rn-codepush/concepts/).
18
18
19
-
These instructions are for React Native New Architecture projects. If your app is already configured, skip to setting up [deployment keys](#configure-deployment-keys) and CI sections to verify configuration.
19
+
These instructions are for React Native New Architecture projects. If your app is already configured, skip to setting up [deployment keys](#add-codepush-to-a-react-native-app) and CI sections to verify configuration.
20
20
21
21
The same Codemagic server can be used for all of your apps.
This enables the SDK to automatically check for updates on app start (or based on your chosen update strategy).
180
180
181
-
6.**Run a test OTA release**
181
+
### CodePush iOS Setup (React Native)
182
+
183
+
This guide covers the iOS-specific configuration required to enable CodePush OTA updates in your React Native app.
184
+
185
+
**1. Install iOS Dependencies**
186
+
187
+
Navigate to the ios directory and install CocoaPods:
188
+
189
+
{{< highlight bash "style=paraiso-dark">}}
190
+
cd ios && pod install && cd ..
191
+
{{< /highlight>}}
192
+
193
+
**2. Update AppDelegate**
194
+
195
+
You need to configure your app to load the JavaScript bundle from CodePush instead of the embedded bundle.
196
+
197
+
**Objective-C**: If your project is `Objective-C` based (scroll down for `Swift` based configuration), then open the `AppDelegate.m` file and add an import statement for the CodePush headers at the top:
198
+
199
+
{{< highlight text "style=paraiso-dark">}}
200
+
#import <CodePush/CodePush.h>
201
+
{{< /highlight>}}
202
+
203
+
**3. Update JS Bundle Location**
204
+
205
+
Find the following existing bundle reference in the `AppDelegate.m` file:
0 commit comments