npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-lifecycle

v0.2.5

Published

This plugin allows you to create an app lifecycle with alpha, beta and production states.

Downloads

9

Readme

cordova-plugin-lifecycle

This plugin allows you to create an app lifecycle with alpha, beta and store variants.

For example if you have an app with an id of com.test.app, this app will create revisions of com.test.app.alpha, com.test.app.beta and com.test.app respectively when performing your build command.

Features

Platforms supported:

  • Android
  • iOS

Build types:

  • Alpha
  • Beta
  • Store

This plugin automatically generates variant-specific icons so you can differentiate between the app variants on your device. You must have configured your icons using config.xml as per the Cordova spec, see Configuring Icons in the CLI.

Installation

Plugin

To install the stable release of the plugin you can run:

cordova plugin add cordova-plugin-lifecycle

For the cutting edge release you can run:

cordova plugin add https://github.com/CookieCookson/cordova-plugin-lifecycle

Usage

Setting up

If you wish to provide a custom overlay for the variants, you must use the <icon-alpha-overlay> and <icon-beta-overlay> tags in config.xml.

<icon-alpha-overlay src="path/to/alpha-overlay.png" />
<icon-beta-overlay src="path/to/beta-overlay.png" />

If no custom overlay is specified, the plugin will add the default overlay to the icons.

Building

Android

If you perform the standard build or run command on the CLI, it will default to using the alpha variant. Alternatively, you can specify which variant you wish to use by passing through a gradle argument:

cordova run android

or

cordova run android -- --gradleArg="-PactiveFlavor=alpha"

This will install an app on your phone with the identifier of com.test.app.alpha.

You can then swap out this activeFlavor variable to choose which variant of build you would like.

cordova run android -- --gradleArg="-PactiveFlavor=beta" --release
cordova run android -- --gradleArg="-PactiveFlavor=store" --release

NOTE: When switching between alpha, beta and store builds on Android, you must first run the clean command else you may get odd results. You can do this by performing:

./platforms/android/cordova/clean

iOS

If you perform the standard build or run command on the CLI, it will default to using the alpha variant. Alternatively, you can specify which variant you wish to use by passing through a variant argument along with a build config:

cordova run ios

or

cordova run ios --alpha --buildConfig="build.alpha.json"

This will install an app on your phone with the identifier of com.test.app.alpha.

You can then swap out --alpha to choose which variant of build you would like.

cordova run ios --beta --buildConfig="build.beta.json" --release
cordova run ios --store --buildConfig="build.store.json" --release

For more information on how to write your build configuration file(s), see the iOS Shell Tool Guide.

Notes

Android

  • Due to how Cordova CLI works, when using this in conjunction with the cordova run command, it will always try and launch the default app id (in this case com.test.app). For now you have to go back to your home screen and then select the correct app. I have been working on a fix and have submitted it to the cordova development team for review: https://issues.apache.org/jira/browse/CB-10140

  • This will not work nicely with the Google Play Beta and Alpha variants as you cannot have multiple IDs on an app. It is suggested when uploading any builds with Google Play you use the store variant.