appcenter-docs
appcenter-docs copied to clipboard
InstallMode -> CodePush.InstallMode, remove 'codePush.sync({ updateDialog: true });' code
https://learn.microsoft.com/en-us/appcenter/distribution/codepush/tutorials#1--silent-mode
codePush.sync({installMode: InstallMode.IMMEDIATE});
InstallMode enum is inside the CodePush, make the following changes to all associated codes
CodePush.sync({
installMode: CodePush.InstallMode.IMMEDIATE
});
https://learn.microsoft.com/en-us/appcenter/distribution/codepush/tutorials#2--active-mode
codePush.sync({ updateDialog: true });
Type 'true' has no properties in common with type 'UpdateDialog'.ts(2559) (property) SyncOptions.updateDialog?: UpdateDialog | undefined An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available, and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as overriding one or more of the default strings.
It seems like updateDialog only accepts arguments, not boolean value
var updateDialogOptions = {
updateTitle: "You have an update",
optionalUpdateMessage: "Update available. Install?",
optionalIgnoreButtonLabel: "Nop",
optionalInstallButtonLabel: "Yep",
};
codePush.sync({ updateDialog: updateDialogOptions});
The above code works perfectly
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: f2517eaa-e073-5949-7cd6-6aa6a8e7159f
- Version Independent ID: 54e7226d-df01-be1a-2322-e7ce098f4086
- Content: Tutorials - Visual Studio App Center
- Content Source: docs/distribution/codepush/tutorials.md
- Service: vs-appcenter
- Sub-service: app-center-distribute
- GitHub Login: @lucen-ms
- Microsoft Alias: lucen