All Projects → chronogolf → nativescript-store-update

chronogolf / nativescript-store-update

Licence: Apache-2.0 license
No description or website provided.

Programming Languages

typescript
32286 projects
shell
77523 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to nativescript-store-update

nativescript-drawingpad
📝 NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Stars: ✭ 89 (+394.44%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-fabric
Handling App URLs in nativescript apps
Stars: ✭ 29 (+61.11%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-appversion
🔢 NativeScript plugin to retrieve your app's package ID and current version
Stars: ✭ 47 (+161.11%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-vue-examples
🍈 NativeScript and Vue code samples.
Stars: ✭ 13 (-27.78%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-printer
📠 Send an image or the screen contents to a physical printer
Stars: ✭ 33 (+83.33%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-clipboard
📋 NativeScript plugin to copy stuff to the device clipboard, and read from it again
Stars: ✭ 40 (+122.22%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-app-shortcuts
👇 Home Icon Actions for your NativeScript app, now also for Android!
Stars: ✭ 45 (+150%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-apple-sign-in
Sign In With Apple, as seen on WWDC 2019, available with iOS 13
Stars: ✭ 37 (+105.56%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-performance-monitor
⚡ Proof your app maintains 60-ish FPS by collecting data or showing it on screen with this NativeScript plugin!
Stars: ✭ 21 (+16.67%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-http
The best way to do HTTP requests in NativeScript, a drop-in replacement for the core HTTP with important improvements and additions like proper connection pooling, form data support and certificate pinning
Stars: ✭ 32 (+77.78%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-taptic-engine
📳 Use Apple's Taptic Engine to vibrate your iPhone 6s (and up) in a variety of ways
Stars: ✭ 16 (-11.11%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-homekit
🏡 HomeKit plugin for your fancy NativeScript app
Stars: ✭ 23 (+27.78%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-pushy
Easy push notifications for your NativeScript app!
Stars: ✭ 19 (+5.56%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-star-printer
🌟 Print directly to Star Micronics printers from your NativeScript app! http://www.starmicronics.com/
Stars: ✭ 28 (+55.56%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-app-icon-changer
Change the homescreen icon of your NativeScript iOS app at runtime!
Stars: ✭ 16 (-11.11%)
Mutual labels:  nativescript, nativescript-plugin
insomnia
😪 NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
Stars: ✭ 40 (+122.22%)
Mutual labels:  nativescript, nativescript-plugin
texttospeech
Text to Speech NativeScript plugin for Android & iOS 📢
Stars: ✭ 44 (+144.44%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-menu
A plugin that adds a pop-up menu to NativeScript
Stars: ✭ 17 (-5.56%)
Mutual labels:  nativescript, nativescript-plugin
ui
Add right-to-left support to the NativeScript framework
Stars: ✭ 22 (+22.22%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-vue-multi-drawer
A NativeScript-Vue component for creating multiple side drawers (4 sides supported)
Stars: ✭ 45 (+150%)
Mutual labels:  nativescript, nativescript-plugin

Nativescript-store-update

npm npm

NPM

This plugin allows you to define a notification strategy regarding your app updates. You are able to specify if you want to force, offer or ignore an update based on the new version available in the platform store.

For example, you could want to force all major version update, but offer the option to your user to chose to update or skip a minor or patch version.

You can also specify how many days after the update release you want to display the alert.

Prerequisites

You need to add appversion plugins for this one to work:

tns plugin add @nativescript/appversion

Installation

tns plugin add nativescript-store-update

Usage

In your main.ts or app.ts file, before app start, call StoreUpdate.init with desired options like so:

    import { StoreUpdate, AlertTypesConstants } from "nativescript-store-update";

    StoreUpdate.init({
        notifyNbDaysAfterRelease: 1,
        majorUpdateAlertType: AlertTypesConstants.OPTION
    })

Localization

The plugin contains some default translations inside json files located in src/i18n folder and required by hand in the src/helpers/locales.helper.ts file. You can also specify a custom translation in the plugin initialization through the configuraiton options. If you want to contribute a regionalized translation, you must use the lang-regionCode format specified in Apple doc, but with the country lowercased (ex: fr-ca, en-us)

API

Configuration options

Property Default Description
majorUpdateAlertType FORCE Alert type for major version change (e.g: A.b.c.d)
minorUpdateAlertType OPTION Alert type for minor version change (e.g: a.B.c.d)
patchUpdateAlertType NONE Alert type for major version change (e.g: a.b.C.d)
revisionUpdateAlertType NONE Alert type for revision version change (e.g: a.b.c.D)
notifyNbDaysAfterRelease 1 Delays the update prompt by a specific number of days
countryCode en country store code
alertOptions null Customize alert dialog text, bypasses the Locale json

Alert types

Key Value Description
FORCE 1 Show an alert that can't be skipped
OPTION 2 Show an alert that can be skipped
NONE 3 Don't display alert at all

AlertOptions configuration (Optional)

Property Default Description
title LocaleText Dialog title, fallback to the locale json
message LocaleText Dialog body text, fallback to the locale json
updateButton LocaleText Dialog update button, fallback to the locale json
skipButton LocaleText Dialog skip button, fallback to the locale json

Development

Clone this repository, go in the src folder then run the command npm run setup You can then use:

  • npm run demo.ios or npm run demo.android to start the demo
  • npm run plugin.tscwatch to watch plugin file and start developing!

The repo contains 2 demos folder, one with angular, and one without. Demos use the bundleId com.bitstrips.imoji as their App version contains Major, Minor and Patch numbers, and they update their app really often. You can change parameters passed ton package init in main.ts or app.ts files and change app version in android app.gradle and ios info.plist config files to test the feature.

License

Apache License Version 2.0, January 2004

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].