mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-09 07:08:57 +08:00
remove constant ON_NEXT_RESTART_OPPORTUNITY
This commit is contained in:
@@ -19,7 +19,7 @@ let CodePushDemoApp = React.createClass({
|
||||
try {
|
||||
return await CodePush.sync(
|
||||
{
|
||||
installMode: CodePush.InstallMode.ON_NEXT_RESTART_OPPORTUNITY,
|
||||
installMode: CodePush.InstallMode.IMMEDIATE,
|
||||
},
|
||||
(syncStatus) => {
|
||||
switch(syncStatus) {
|
||||
|
||||
@@ -375,7 +375,6 @@ public class CodePush implements ReactPackage {
|
||||
constants.put("codePushInstallModeImmediate", CodePushInstallMode.IMMEDIATE.getValue());
|
||||
constants.put("codePushInstallModeOnNextRestart", CodePushInstallMode.ON_NEXT_RESTART.getValue());
|
||||
constants.put("codePushInstallModeOnNextResume", CodePushInstallMode.ON_NEXT_RESUME.getValue());
|
||||
constants.put("codePushInstallModeOnNextRestartOpportunity", CodePushInstallMode.ON_NEXT_RESTART_OPPORTUNITY.getValue());
|
||||
|
||||
constants.put("codePushUpdateStateRunning", CodePushUpdateState.RUNNING.getValue());
|
||||
constants.put("codePushUpdateStatePending", CodePushUpdateState.PENDING.getValue());
|
||||
|
||||
@@ -146,7 +146,6 @@ failCallback:(void (^)(NSError *err))failCallback;
|
||||
typedef NS_ENUM(NSInteger, CodePushInstallMode) {
|
||||
CodePushInstallModeImmediate,
|
||||
CodePushInstallModeOnNextRestart,
|
||||
CodePushInstallModeOnNextRestartOpportunity,
|
||||
CodePushInstallModeOnNextResume
|
||||
};
|
||||
|
||||
|
||||
@@ -216,7 +216,6 @@ static NSString *bundleResourceName = @"main";
|
||||
@"codePushInstallModeOnNextRestart":@(CodePushInstallModeOnNextRestart),
|
||||
@"codePushInstallModeImmediate": @(CodePushInstallModeImmediate),
|
||||
@"codePushInstallModeOnNextResume": @(CodePushInstallModeOnNextResume),
|
||||
@"codePushInstallModeOnNextRestartOpportunity": @(CodePushInstallModeOnNextRestartOpportunity),
|
||||
|
||||
@"codePushUpdateStateRunning": @(CodePushUpdateStateRunning),
|
||||
@"codePushUpdateStatePending": @(CodePushUpdateStatePending),
|
||||
|
||||
9
typings/react-native-code-push.d.ts
vendored
9
typings/react-native-code-push.d.ts
vendored
@@ -219,20 +219,17 @@ declare namespace CodePush {
|
||||
function notifyAppReady(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Allow CodePush to automatically restart the app if an update is installed with
|
||||
* InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
|
||||
* Allow CodePush to restart the app.
|
||||
*/
|
||||
function allowRestart(): void;
|
||||
|
||||
/**
|
||||
* Forbid CodePush to automatically restart the app if an update is installed with
|
||||
* InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
|
||||
* Forbid CodePush to restart the app.
|
||||
*/
|
||||
function disallowRestart(): void;
|
||||
|
||||
/**
|
||||
* Check if CodePush is allowed to automatically restart the app if an update is installed
|
||||
* with InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
|
||||
* Check if CodePush is allowed to restart the app.
|
||||
*/
|
||||
function restartAllowed(): boolean;
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace CodePush.ReactNative
|
||||
{ "codePushInstallModeImmediate", InstallMode.Immediate },
|
||||
{ "codePushInstallModeOnNextResume", InstallMode.OnNextResume },
|
||||
{ "codePushInstallModeOnNextRestart", InstallMode.OnNextRestart },
|
||||
{ "codePushInstallModeOnNextRestartOpportunity", InstallMode.OnNextRestartOpportunity },
|
||||
{ "codePushUpdateStateRunning", UpdateState.Running },
|
||||
{ "codePushUpdateStatePending", UpdateState.Pending },
|
||||
{ "codePushUpdateStateLatest", UpdateState.Lastest },
|
||||
|
||||
Reference in New Issue
Block a user