Skip to content

Commit fdb5e3c

Browse files
committed
docs: mark RN 0.82-0.83 supported
Fixes #17
1 parent 97d569f commit fdb5e3c

File tree

4 files changed

+51
-27
lines changed

4 files changed

+51
-27
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ See the [corresponding steps](./docs/migrating-to-v10.md).
103103
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the CodePush plugin in order to support the exact version of React Native you are using. The following table outlines which CodePush plugin versions officially support the respective React Native versions:
104104

105105
| React Native version(s) | Android | iOS | Old arch | New arch | Supporting CodePush version(s) |
106-
| ----------------------- | --------------- | ---- | -------- | -------- | ------------------------------ |
106+
|-------------------------| --------------- | ---- | -------- | -------- | ------------------------------ |
107107
| <0.59 | - | - ||| **Unsupported** |
108108
| v0.59 | 4.1+ (TLS 1.2+) | 7 ||| v5.7.1 |
109109
| v0.60-v0.61 | 4.1+ (TLS 1.2+) | 7 ||| v6.3.1 |
@@ -112,7 +112,7 @@ We try our best to maintain backwards compatibility of our plugin with previous
112112
| v0.71-v0.79 | 4.1+ (TLS 1.2+) | 9 ||| v8.3.2 |
113113
| v0.71-v0.79 | 4.1+ (TLS 1.2+) | 15.5 ||| v9.0.2 |
114114
| v0.71-v0.80 | 4.1+ (TLS 1.2+) | 15.5 ||| v10+ |
115-
| v0.74-v0.81 | 4.1+ (TLS 1.2+) | 15.5 ||| v11+ |
115+
| v0.74-v0.83 | 4.1+ (TLS 1.2+) | 15.5 ||| v11+ |
116116

117117
We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.
118118

docs/code-signing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Add record in `Info.plist` with name `CodePushSigningPublicKey` and string value
5454
<!-- ...other configs... -->
5555

5656
<key>CodePushSigningPublicKey</key>
57-
<string>-----BEGIN PUBLIC KEY-----
57+
<string>-----BEGIN PUBLIC KEY-----
5858
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANkWYydPuyOumR/sn2agNBVDnzyRpM16NAUpYPGxNgjSEp0etkDNgzzdzyvyl+OsAGBYF3jCxYOXozum+uV5hQECAwEAAQ==
5959
-----END PUBLIC KEY-----</string>
6060

docs/setup-android.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,31 @@
1414

1515
2. Update the `MainApplication` file to use CodePush via the following changes:
1616

17-
If your MainApplication is a Kotlin file, update the `MainApplication.kt`
17+
If your MainApplication is a Kotlin file on RN >= 0.82, update the `MainApplication.kt`:
18+
19+
```kotlin
20+
...
21+
// 1. Import the plugin class.
22+
import com.appzung.codepush.react.CodePush
23+
24+
class MainApplication : Application(), ReactApplication {
25+
26+
override val reactHost: ReactHost by lazy {
27+
getDefaultReactHost(
28+
context = applicationContext,
29+
packageList =
30+
PackageList(this).packages.apply {
31+
// Packages that cannot be autolinked yet can be added manually here, for example:
32+
// add(MyReactNativePackage())
33+
},
34+
// 2. Override the getJSBundleFile method in order to let
35+
// the CodePush runtime determine where to get the JS
36+
// bundle location from on each app start (after packageList)
37+
jsBundleFilePath = CodePush.getJSBundleFile(),
38+
...
39+
```
40+
41+
If your MainApplication is a Kotlin file on RN < 0.82, update the `MainApplication.kt`:
1842

1943
```kotlin
2044
...
@@ -95,7 +119,7 @@
95119
```xml
96120
<resources>
97121
<string name="app_name">AppName</string>
98-
<string moduleConfig="true" name="CodePushReleaseChannelPublicId">ReleaseChannelPublicId</string>
122+
<string name="CodePushReleaseChannelPublicId">ReleaseChannelPublicId</string>
99123
</resources>
100124
```
101125

docs/setup-ios.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44

55
### Plugin Installation and Configuration
66

7-
1. Run `cd ios && pod install && cd ..` to install all the necessary CocoaPods dependencies.
7+
1. Run `cd ios && pod install && cd ..` to install all the necessary CocoaPods dependencies. You may have to change the `Podfile`'s min iOS version to 15.5 (`platform :ios, '15.5'`).
88

9-
2. Open up the `AppDelegate.m`/`AppDelegate.swift` file, and add an import statement for the CodePush headers:
10-
11-
```objective-c
12-
#import <CodePush/CodePush.h>
13-
```
9+
2. Open up the `AppDelegate.swift`/`AppDelegate.m` file, and add an import statement for the CodePush headers:
1410

1511
```swift
1612
import CodePush
1713
```
1814

19-
3. Find the following line of code, which sets the source URL for bridge for production releases:
20-
2115
```objective-c
22-
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
16+
#import <CodePush/CodePush.h>
2317
```
2418

19+
3. Find the following line of code, which sets the source URL for bridge for production releases:
20+
2521
```swift
2622
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
2723
```
2824

29-
4. Replace it with this line:
30-
3125
```objective-c
32-
return [CodePush bundleURL];
26+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
3327
```
3428
29+
4. Replace it with this line:
30+
3531
```swift
3632
CodePush.bundleURL()
3733
```
3834

35+
```objective-c
36+
return [CodePush bundleURL];
37+
```
38+
3939
This change configures your app to always load the most recent version of your app's JS bundle. On the first launch, this will correspond to the file that was compiled with the app. However, after an update has been pushed via CodePush, this will return the location of the most recently installed update.
4040

4141
_NOTE: The `bundleURL` method assumes your app's JS bundle is named `main.jsbundle`. If you have configured your app to use a different file name, simply call the `bundleURLForResource:` method (which assumes you're using the `.jsbundle` extension) or `bundleURLForResource:withExtension:` method instead, in order to overwrite that default behavior_
@@ -44,6 +44,16 @@
4444

4545
Your `sourceURLForBridge` method should look like this:
4646

47+
```swift
48+
override func bundleURL() -> URL? {
49+
#if DEBUG
50+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
51+
#else
52+
CodePush.bundleURL()
53+
#endif
54+
}
55+
```
56+
4757
```objective-c
4858
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
4959
{
@@ -55,16 +65,6 @@
5565
}
5666
```
5767
58-
```swift
59-
override func bundleURL() -> URL? {
60-
#if DEBUG
61-
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
62-
#else
63-
CodePush.bundleURL()
64-
#endif
65-
}
66-
```
67-
6868
5. Add the Release channel public ID to `Info.plist`:
6969
7070
To let the CodePush runtime know which release channel it should query for updates against, open your app's `Info.plist` file and add a new entry named `CodePushReleaseChannelPublicId`, whose value is the public ID of the release channel you want to configure this app against. You can retrieve this value by running `appzung release-channels list` in the AppZung CLI and copying the value of the `Public ID` column.

0 commit comments

Comments
 (0)