@wuilmerj24/store-update
v2.0.0
Published
NativeScript Store Update Plugin This plugin allows you to detect if a new version of your app is available in the App Store (iOS) or Google Play Store (Android) and redirects the user to the store to update.
Maintainers
Readme
@wuilmerj24/store-update
npm install @wuilmerj24/store-updateApp Version Utilities
Este módulo proporciona métodos útiles para obtener información de versión y verificar actualizaciones en aplicaciones NativeScript (Android e iOS).
Métodos Disponibles
| Method | Description | Android | iOS |
|--------|-------------|---------|-----|
| getAppId() | Retrieves the installed app's package ID. | ✓ | ✓ |
| getLocalVersion() | Retrieves the installed app's versionName (Android) or CFBundleShortVersionString (iOS). | ✓ | ✓ |
| getNubeVersion(country?) | Gets the latest available version from the Play Store (Android) or the App Store (iOS). The optional country parameter is iOS-only and specifies the country where the app should be looked up. | ✓ | ✓ |
| updateApp(forceUpdate: boolean, okTextButton?: string, cancelTextButton?: string, message?: string, openAppStore?: boolean, bgColor?: string, textColor?: string, bgBtnColor?: string, textbtnColor?: string) | Checks for a new version available in the app stores. If forceUpdate=true, it forces the user to update. | ✓ | ✓ |
| checkUpdateNative() | Android only: Updates the app without leaving it (using In-App Updates). | ✓ | ✗ |
Uso Básico
import { StoreUpdate } from '@wuilmerj24/store-update';
const store:StoreUpdate=new StoreUpdate();
// Obtener información de versión
console.log('Version:', store.getAppId());
// Verificar actualizaciones
store.checkUpdateNative(); // Con alerta interactiva
## License
Apache License Version 2.0