@turbopush/react-native-code-push 9.0.2 → 10.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitconfig +6 -0
- package/CodePush.podspec +4 -3
- package/README.md +57 -71
- package/android/app/build.gradle +15 -0
- package/android/app/proguard-rules.pro +8 -0
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +37 -34
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +4 -4
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +202 -45
- package/android/app/src/main/java/com/microsoft/codepush/react/ReactHostHolder.java +11 -0
- package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +3 -0
- package/android/codepush.gradle +2 -2
- package/docs/api-android.md +24 -55
- package/docs/multi-deployment-testing-android.md +1 -94
- package/docs/setup-android.md +23 -421
- package/docs/setup-ios.md +62 -204
- package/expo.js +324 -0
- package/ios/CodePush/CodePushConfig.m +1 -1
- package/package.json +12 -3
- package/react-native.config.js +2 -1
- package/scripts/tools/linkToolsAndroid.js +1 -1
- package/tsconfig.json +4 -1
- package/windows/CodePush/CodePushConfig.cpp +1 -1
- package/windows-legacy/CodePush.Shared/CodePushConstants.cs +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
package/react-native.config.js
CHANGED
|
@@ -3,7 +3,8 @@ module.exports = {
|
|
|
3
3
|
platforms: {
|
|
4
4
|
android: {
|
|
5
5
|
packageInstance:
|
|
6
|
-
"
|
|
6
|
+
"CodePush.getInstance(getResources().getString(R.string.CodePushDeploymentKey), getApplicationContext(), BuildConfig.DEBUG)",
|
|
7
|
+
sourceDir: './android/app',
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
}
|
|
@@ -13,7 +13,7 @@ exports.getJSBundleFileOverride = `
|
|
|
13
13
|
`;
|
|
14
14
|
exports.reactNativeHostInstantiation = "new ReactNativeHost(this) {";
|
|
15
15
|
exports.mainActivityClassDeclaration = "public class MainActivity extends ReactActivity {";
|
|
16
|
-
exports.codePushGradleLink = `\napply from: "../../node_modules/react-native-code-push/android/codepush.gradle"`;
|
|
16
|
+
exports.codePushGradleLink = `\napply from: "../../node_modules/@turbopush/react-native-code-push/android/codepush.gradle"`;
|
|
17
17
|
exports.deploymentKeyName = "CodePushDeploymentKey";
|
|
18
18
|
|
|
19
19
|
exports.getMainApplicationLocation = function () {
|
package/tsconfig.json
CHANGED
|
@@ -81,7 +81,7 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
|
|
|
81
81
|
|
|
82
82
|
if (!serverUrl.has_value())
|
|
83
83
|
{
|
|
84
|
-
s_currentConfig.m_configuration.Insert(ServerURLConfigKey, L"https://
|
|
84
|
+
s_currentConfig.m_configuration.Insert(ServerURLConfigKey, L"https://api.turbopush.org/");
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
::Microsoft::CodePush::ReactNative::CodePushNativeModule::LoadBundle();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
internal class CodePushConstants
|
|
4
4
|
{
|
|
5
5
|
internal const string BinaryModifiedTimeKey = "binaryModifiedTime";
|
|
6
|
-
internal const string CodePushServerUrl = "https://
|
|
6
|
+
internal const string CodePushServerUrl = "https://api.turbopush.org/";
|
|
7
7
|
internal const string CodePushFolderPrefix = "CodePush";
|
|
8
8
|
internal const string CodePushPreferences = "CodePush";
|
|
9
9
|
internal const string CurrentPackageKey = "currentPackage";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
package com.microsoft.codepush.react;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
public class CodePushBuilder {
|
|
6
|
-
private String mDeploymentKey;
|
|
7
|
-
private Context mContext;
|
|
8
|
-
|
|
9
|
-
private boolean mIsDebugMode;
|
|
10
|
-
private String mServerUrl;
|
|
11
|
-
private Integer mPublicKeyResourceDescriptor;
|
|
12
|
-
|
|
13
|
-
public CodePushBuilder(String deploymentKey, Context context) {
|
|
14
|
-
this.mDeploymentKey = deploymentKey;
|
|
15
|
-
this.mContext = context;
|
|
16
|
-
this.mServerUrl = CodePush.getServiceUrl();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public CodePushBuilder setIsDebugMode(boolean isDebugMode) {
|
|
20
|
-
this.mIsDebugMode = isDebugMode;
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public CodePushBuilder setServerUrl(String serverUrl) {
|
|
25
|
-
this.mServerUrl = serverUrl;
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public CodePushBuilder setPublicKeyResourceDescriptor(int publicKeyResourceDescriptor) {
|
|
30
|
-
this.mPublicKeyResourceDescriptor = publicKeyResourceDescriptor;
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public CodePush build() {
|
|
35
|
-
return new CodePush(this.mDeploymentKey, this.mContext, this.mIsDebugMode, this.mServerUrl, this.mPublicKeyResourceDescriptor);
|
|
36
|
-
}
|
|
37
|
-
}
|