New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-in-app-update

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-in-app-update

An Android Cordova plugin that allows users to update app to letest version without leaving the application

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-28.57%
Maintainers
0
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 21 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc