Socket
Socket
Sign inDemoInstall

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...


Version published
Weekly downloads
1.9K
increased by2.7%
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);
	console.log('BuildInfo.buildDate      =' + BuildInfo.buildDate);
	console.log('BuildInfo.installDate    =' + BuildInfo.installDate);
}

Installation

cordova plugin add cordova-plugin-buildinfo

Supported Platforms

  • Android
  • iOS
  • Windows

Properties

  • BuildInfo.packageName
  • BuildInfo.basePackageName
  • BuildInfo.displayName
  • BuildInfo.name
  • BuildInfo.version
  • BuildInfo.versionCode
  • BuildInfo.debug
  • BuildInfo.buildType
  • BuildInfo.flavor
  • BuildInfo.buildDate
  • BuildInfo.installDate
  • BuildInfo.windows
    • logo
    • version

BuildInfo.packageName

Get the packageName of Application ID.

PlatformValueType
AndroidPackage NameString
iOSBundle IdentifierString
WindowsIdentity nameString

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
WindowsIdentity name(equals BuildInfo.packageName)String

BuildInfo.displayName

Get the displayName.

PlatformValueType
AndroidApplication LabelString
iOSCFBundleDisplayNameString
WindowsGet DisplayName attribute of VisualElements element in AppxManifest.xml file.String

BuildInfo.name

Get the name.

PlatformValueType
AndroidApplication Label(equal BuildInfo.displayName)String
iOSCFBundleNameString
WindowsWindows Store display nameString

BuildInfo.version

Get the version.

PlatformValueType
AndroidBuildConfig.VERSION_NAMEString
iOSCFBundleShortVersionStringString
WindowsMajor.Minor.Build ex) "1.2.3"String

BuildInfo.versionCode

Get the version code.

PlatformValueType
AndroidBuildConfig.VERSION_CODEint
iOSCFBundleVersionstring
WindowsMajor.Minor.Build.Revision ex) "1.2.3.4"String

BuildInfo.debug

Get the debug flag.

PlatformValueType
AndroidBuildConfig.DEBUGBoolean
iOSdefined "DEBUG" is trueBoolean
WindowsisDevelopmentMode is trueBoolean

BuildInfo.buildType

Android , Windows Only.

Get the build type.

PlatformValueType
AndroidBuildConfig.BUILD_TYPEString
iOSempty stringString
Windows"release" or "debug"String

BuildInfo.flavor

Android Only.

Get the flavor.

PlatformValueType
AndroidBuildConfig.FLAVORString
iOSempty stringString
Windowsempty stringString

BuildInfo.buildDate

Get the build date and time in the Date object returns.

Attention:

  • Android: Add the BuildInfo.gradle file to your Android project.
    The BuildInfo.gradle file contains the setting to add the _BUILDINFO_TIMESTAMP field to the BuildConfig class.
  • Windows: Add the buildinfo.resjson file to your Windows project.
    The buildinfo.resjson file into the "strings" folder.
    And also add a task to rewrite buildinfo.resjson in the CordovaApp.projitems file.
PlatformValueType
AndroidBuildConfig._BUILDINFO_TIMESTAMP valueDate
iOSGet the modification date and time of the Info.plist file acquired from the executionPath property of the main bundle.Date
WindowsResource value of "/buildinfo/Timestamp" string.Date

BuildInfo.installDate

Get the install date and time in the Date object returns.

PlatformValueType
AndroidThe firstInstallTime property of PackageInfoDate
iOSGet the creation date and time of the document directory.Date
WindowsThe installedDate property of Windows.ApplicatinoModel.Package.currentDate

BuildInfo.windows

Windows Only.

Get the windows extra information.

PlatformValueType
Androidundefinedundefined
iOSundefinedundefined
WindowsObjectObject
Property nameValueType
architectureWindows.ApplicationModel.Package.current.id.architectureinteger
descriptionWindows.ApplicationModel.Package.current.descriptionString
displayNameWindows.ApplicationModel.Package.current.displayNameString
familyNameWindows.ApplicationModel.Package.current.id.familyNameString
fullNameWindows.ApplicationModel.Package.current.id.fullNameString
logoObjectObject
publisherWindows.ApplicationModel.Package.current.id.publisherString
publisherIdWindows.ApplicationModel.Package.current.id.publisherIdString
publisherDisplayNameWindows.ApplicationModel.Package.current.publisherDisplayNameString
resourceIdWindows.ApplicationModel.Package.current.id.resourceIdString
versionWindows.ApplicationModel.Package.current.id.versionObject
Property nameValueType
absoluteCannonicalUriWindows.ApplicationModel.Package.logo.absoluteCanonicalUriString
absoluteUriWindows.ApplicationModel.Package.logo.absoluteUriString
displayIriWindows.ApplicationModel.Package.logo.displayIriString
displayUriWindows.ApplicationModel.Package.logo.displayUriString
pathWindows.ApplicationModel.Package.logo.pathString
rawUriWindows.ApplicationModel.Package.logo.rawUriString
BuildInfo.windows.version
Property nameValueType
majorWindows.ApplicationModel.Package.current.id.version.majorinteger
minorWindows.ApplicationModel.Package.current.id.version.minorinteger
buildWindows.ApplicationModel.Package.current.id.version.buildinteger
revisionWindows.ApplicationModel.Package.current.id.version.revisioninteger

Keywords

FAQs

Package last updated on 11 Sep 2017

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