remove constant ON_NEXT_RESTART_OPPORTUNITY

This commit is contained in:
danielbasedow
2016-05-22 19:26:20 +02:00
parent 0745fe407e
commit be3a74f3b0
6 changed files with 4 additions and 11 deletions

View File

@@ -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) {

View File

@@ -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());

View File

@@ -146,7 +146,6 @@ failCallback:(void (^)(NSError *err))failCallback;
typedef NS_ENUM(NSInteger, CodePushInstallMode) {
CodePushInstallModeImmediate,
CodePushInstallModeOnNextRestart,
CodePushInstallModeOnNextRestartOpportunity,
CodePushInstallModeOnNextResume
};

View File

@@ -216,7 +216,6 @@ static NSString *bundleResourceName = @"main";
@"codePushInstallModeOnNextRestart":@(CodePushInstallModeOnNextRestart),
@"codePushInstallModeImmediate": @(CodePushInstallModeImmediate),
@"codePushInstallModeOnNextResume": @(CodePushInstallModeOnNextResume),
@"codePushInstallModeOnNextRestartOpportunity": @(CodePushInstallModeOnNextRestartOpportunity),
@"codePushUpdateStateRunning": @(CodePushUpdateStateRunning),
@"codePushUpdateStatePending": @(CodePushUpdateStatePending),

View File

@@ -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;

View File

@@ -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 },