Giter Club home page Giter Club logo

cordova-app-update-plugin's Introduction

cordova-in-app-update

This pluging enabels In app update For cordova.

Supports

  • Flexible update
  • Immeidiate update
  • Stalneess days For both type of updates
  • Priority updates

Configs

  • type : Provides option to user which strategy to use IMMEDIATE or FLEXIBLE or MIXED (Required)
  • stallDays : Provides stalness day configuration for type IMMEDIATE and FLEXIBLE (Required for type IMMEDIATE and FLEXIBLE)
  • flexibleUpdateStalenessDays : Provide stalness days for flexible update in case of type MIXED (Required for type MIXED)
  • immediateUpdateStalenessDays : Provide stalness days for immeidiate update in case of type MIXED (Required for type MIXED)
  • alertTitle (only applicable in ios config) : Provides custom title for IOS alert box (default : "New Version")
  • alertMessage (only applicable in ios config) : Provides custom message for IOS alert box (defualt: "version <version> of <appName> is available on the AppStore.")
  • alertCancelButtonTitle (only applicable in ios config) : Provides custom cancel button title for IOS alert box (default: "Not Now")
  • alertUpdateButtonTitle (only applicable in ios config) : Provides custom update button title for IOS alert box (default: "Update")

Examples

Flexible update with 5 staleness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
       type: "FLEXIBLE",
       stallDays: 5
   },
   ANDROID: {
        type: "FLEXIBLE",
        stallDays: 5
    }
});

Immediate update with 5 staleness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
       type: "IMMEDIATE",
       stallDays: 5
   },
   ANDROID: {
        type: "IMMEDIATE",
        stallDays: 5
    }
});

Flexible update with 2 staleness days and Immediate update with 5 stalness days in both android and ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
   },
   ANDROID: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
    }
});

Flexible update with 2 staleness days and Immediate update with 5 stalness days in both android and ios and custom messages for ios

window.plugins.updatePlugin.update(()=>{
//success callback
},()=>{
//error callback
},{
   IOS: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5,
        alertTitle: "Hola new update!",
        alertMessage: "Please update your app for new Features!",
        alertCancelButtonTitle: "Nope",
        alertUpdateButtonTitle: "Go ahead!"
   },
   ANDROID: {
        type: "MIXED",
        flexibleUpdateStalenessDays: 2,
        immediateUpdateStalenessDays: 5
    }
});

Priority (only applicable for android)

stalness will be ignored in this case

  • If priority of released app is >= 3 it will trigger Immediate update
  • If priority of released app is >= 1 it will trigger Flexible update

Note: To determine priority, Google Play uses an integer value between 0 and 5, with 0 being the default, and 5 being the highest priority. To set the priority for an update, use inAppUpdatePriority field under Edits.tracks.releases in the Google Play Developer API. Priority can only be set when rolling out a new release, and cannot be changed later.

cordova-app-update-plugin's People

Contributors

mrspark2591 avatar r-oro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-app-update-plugin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.