UNPKG

@appzung/react-native-code-push

Version:

React Native plugin for the CodePush service

36 lines (34 loc) 2.65 kB
"use strict"; import { NativeRNAppZungCodePushModule } from "../internals/NativeRNAppZungCodePushModule.js"; /** * Indicates when you would like an installed update to actually be applied. */ export let InstallMode = function (InstallMode) { /** * Indicates that you want to install the update and restart the app immediately. * * This value is appropriate for debugging scenarios as well as when displaying an update prompt to the user, since they would expect to see the changes immediately after accepting the installation. Additionally, this mode can be used to enforce mandatory updates, since it removes the potentially undesired latency between the update installation and the next time the end user restarts or resumes the app. */ InstallMode[InstallMode["IMMEDIATE"] = NativeRNAppZungCodePushModule.getConstants().codePushInstallModeImmediate] = "IMMEDIATE"; /** * Indicates that you want to install the update, but not forcibly restart the app. * * When the app is "naturally" restarted (due the OS or end user killing it), the update will be seamlessly picked up. This value is appropriate when performing silent updates, since it would likely be disruptive to the end user if the app suddenly restarted out of nowhere, since they wouldn't have realized an update was even downloaded. This is the default mode used for both the `sync` and `LocalPackage.install` methods. */ InstallMode[InstallMode["ON_NEXT_RESTART"] = NativeRNAppZungCodePushModule.getConstants().codePushInstallModeOnNextRestart] = "ON_NEXT_RESTART"; /** * Indicates that you want to install the update, but don't want to restart the app until the next time the end user resumes it from the background. * * This way, you don't disrupt their current session,but you can get the update in front of them sooner than having to wait for the next natural restart. * This value is appropriate for silent installs that can be applied on resume in a non-invasive way. */ InstallMode[InstallMode["ON_NEXT_RESUME"] = NativeRNAppZungCodePushModule.getConstants().codePushInstallModeOnNextResume] = "ON_NEXT_RESUME"; /** * Indicates that you want to install the update when the app is in the background, * but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default), * so that user context isn't lost unless the app suspension is long enough to not matter. */ InstallMode[InstallMode["ON_NEXT_SUSPEND"] = NativeRNAppZungCodePushModule.getConstants().codePushInstallModeOnNextSuspend] = "ON_NEXT_SUSPEND"; return InstallMode; }({}); //# sourceMappingURL=InstallMode.enum.js.map