Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 4e63185

Browse files
committed
Alias notifyAppReady
1 parent c7b6dd2 commit 4e63185

File tree

2 files changed

+45
-45
lines changed

2 files changed

+45
-45
lines changed

CodePush.js

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -387,52 +387,52 @@ let CodePush;
387387
// and therefore, it doesn't make sense initializing
388388
// the JS interface when it wouldn't work anyways.
389389
if (NativeCodePush) {
390-
CodePush = {
391-
AcquisitionSdk: Sdk,
392-
checkForUpdate,
393-
getConfiguration,
394-
getCurrentPackage,
395-
getUpdateMetadata,
396-
log,
397-
notifyApplicationReady,
398-
restartApp,
399-
restartApplication: restartApp,
400-
setUpTestDependencies,
401-
sync,
402-
InstallMode: {
403-
IMMEDIATE: NativeCodePush.codePushInstallModeImmediate, // Restart the app immediately
404-
ON_NEXT_RESTART: NativeCodePush.codePushInstallModeOnNextRestart, // Don't artificially restart the app. Allow the update to be "picked up" on the next app restart
405-
ON_NEXT_RESUME: NativeCodePush.codePushInstallModeOnNextResume // Restart the app the next time it is resumed from the background
406-
},
407-
SyncStatus: {
408-
CHECKING_FOR_UPDATE: 0,
409-
AWAITING_USER_ACTION: 1,
410-
DOWNLOADING_PACKAGE: 2,
411-
INSTALLING_UPDATE: 3,
412-
UP_TO_DATE: 4, // The running app is up-to-date
413-
UPDATE_IGNORED: 5, // The app had an optional update and the end-user chose to ignore it
414-
UPDATE_INSTALLED: 6, // The app had an optional/mandatory update that was successfully downloaded and is about to be installed.
415-
SYNC_IN_PROGRESS: 7, // There is an ongoing "sync" operation in progress.
416-
UNKNOWN_ERROR: -1
417-
},
418-
UpdateState: {
419-
RUNNING: NativeCodePush.codePushUpdateStateRunning,
420-
PENDING: NativeCodePush.codePushUpdateStatePending,
421-
LATEST: NativeCodePush.codePushUpdateStateLatest
422-
},
423-
DEFAULT_UPDATE_DIALOG: {
424-
appendReleaseDescription: false,
425-
descriptionPrefix: " Description: ",
426-
mandatoryContinueButtonLabel: "Continue",
427-
mandatoryUpdateMessage: "An update is available that must be installed.",
428-
optionalIgnoreButtonLabel: "Ignore",
429-
optionalInstallButtonLabel: "Install",
430-
optionalUpdateMessage: "An update is available. Would you like to install it?",
431-
title: "Update available"
432-
}
390+
CodePush = {
391+
AcquisitionSdk: Sdk,
392+
checkForUpdate,
393+
getConfiguration,
394+
getCurrentPackage,
395+
getUpdateMetadata,
396+
log,
397+
notifyAppReady: notifyApplicationReady,
398+
notifyApplicationReady,
399+
restartApp,
400+
setUpTestDependencies,
401+
sync,
402+
InstallMode: {
403+
IMMEDIATE: NativeCodePush.codePushInstallModeImmediate, // Restart the app immediately
404+
ON_NEXT_RESTART: NativeCodePush.codePushInstallModeOnNextRestart, // Don't artificially restart the app. Allow the update to be "picked up" on the next app restart
405+
ON_NEXT_RESUME: NativeCodePush.codePushInstallModeOnNextResume // Restart the app the next time it is resumed from the background
406+
},
407+
SyncStatus: {
408+
CHECKING_FOR_UPDATE: 0,
409+
AWAITING_USER_ACTION: 1,
410+
DOWNLOADING_PACKAGE: 2,
411+
INSTALLING_UPDATE: 3,
412+
UP_TO_DATE: 4, // The running app is up-to-date
413+
UPDATE_IGNORED: 5, // The app had an optional update and the end-user chose to ignore it
414+
UPDATE_INSTALLED: 6, // The app had an optional/mandatory update that was successfully downloaded and is about to be installed.
415+
SYNC_IN_PROGRESS: 7, // There is an ongoing "sync" operation in progress.
416+
UNKNOWN_ERROR: -1
417+
},
418+
UpdateState: {
419+
RUNNING: NativeCodePush.codePushUpdateStateRunning,
420+
PENDING: NativeCodePush.codePushUpdateStatePending,
421+
LATEST: NativeCodePush.codePushUpdateStateLatest
422+
},
423+
DEFAULT_UPDATE_DIALOG: {
424+
appendReleaseDescription: false,
425+
descriptionPrefix: " Description: ",
426+
mandatoryContinueButtonLabel: "Continue",
427+
mandatoryUpdateMessage: "An update is available that must be installed.",
428+
optionalIgnoreButtonLabel: "Ignore",
429+
optionalInstallButtonLabel: "Install",
430+
optionalUpdateMessage: "An update is available. Would you like to install it?",
431+
title: "Update available"
433432
}
433+
};
434434
} else {
435-
log("The CodePush module doesn't appear to be properly installed. Please double-check that everything is setup correctly.");
435+
log("The CodePush module doesn't appear to be properly installed. Please double-check that everything is setup correctly.");
436436
}
437437

438438
module.exports = CodePush;

react-native-code-push.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ declare namespace CodePush {
204204
/**
205205
* Notifies the CodePush runtime that an installed update is considered successful.
206206
*/
207-
function notifyApplicationReady(): ReactNativePromise<void>;
207+
function notifyAppReady(): ReactNativePromise<void>;
208208

209209
/**
210210
* Immediately restarts the app.

0 commit comments

Comments
 (0)