Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-buildinfo

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-buildinfo

Cordova/Phonegap Build Information Plugin. Get PackageName, Version, Debug and more...

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-5.56%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Code Climate MIT License

cordova-plugin-buildinfo

This plugin defines a global BuildInfo object.

BuildInfo object is available at the time the deviceready event fires.

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
	console.log('BuildInfo.packageName    =' + BuildInfo.packageName);
	console.log('BuildInfo.basePackageName=' + BuildInfo.basePackageName);
	console.log('BuildInfo.displayName    =' + BuildInfo.displayName);
	console.log('BuildInfo.name           =' + BuildInfo.name);
	console.log('BuildInfo.version        =' + BuildInfo.version);
	console.log('BuildInfo.versionCode    =' + BuildInfo.versionCode);
	console.log('BuildInfo.debug          =' + BuildInfo.debug);
	console.log('BuildInfo.buildType      =' + BuildInfo.buildType);
	console.log('BuildInfo.flavor         =' + BuildInfo.flavor);
}

Installation

cordova plugin add cordova-plugin-buildinfo

Supported Platforms

  • Android
  • iOS

Properties

  • BuildInfo.packageName
  • BuildInfo.basePackageName
  • BuildInfo.displayName
  • BuildInfo.name
  • BuildInfo.version
  • BuildInfo.versionCode
  • BuildInfo.debug
  • BuildInfo.buildType
  • BuildInfo.flavor

BuildInfo.packageName

Get the packageName of Application ID.

PlatformValueType
AndroidPackage NameString
iOSBundle IdentifierString

BuildInfo.basePackageName

Android only.

Get the packageName of BuildConfig class.

If you use the configure of "build types" or "product flavors", because you can specify a different package name is the id attribute of the widget element of config.xml, is the property to get the package name that BuildConfig class belongs. (ought be the same as the id attribute of the widget element of config.xml)

PlatformValueType
AndroidPackage name of BuildConfig classString
iOSBundle Identifier(equals BuildInfo.packageName)String

BuildInfo.displayName

Get the displayName.

PlatformValueType
AndroidApplication LabelString
iOSCFBundleDisplayNameString

BuildInfo.name

Get the name.

PlatformValueType
AndroidApplication Label(equal BuildInfo.displayName)String
iOSCFBundleNameString

BuildInfo.version

Get the version.

PlatformValueType
AndroidBuildConfig.VERSION_NAMEString
iOSCFBundleShortVersionStringString

BuildInfo.versionCode

Get the version code.

PlatformValueType
AndroidBuildConfig.VERSION_CODEint
iOSCFBundleVersionstring

BuildInfo.debug

Get the debug flag.

PlatformValueType
AndroidBuildConfig.DEBUGBoolean
iOSdefined "DEBUG" is trueBoolean

BuildInfo.buildType

Android Only.

Get the build type.

PlatformValueType
AndroidBuildConfig.BUILD_TYPEString
iOSempty stringString

BuildInfo.flavor

Android Only.

Get the flavor.

PlatformValueType
AndroidBuildConfig.FLAVORString
iOSempty stringString

Keywords

FAQs

Package last updated on 31 May 2016

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