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

skwas-cordova-plugin-appinfo

v2.0.0

Published

Cordova AppInfo Plugin

Downloads

13

Readme

npm version

skwas-cordova-plugin-appinfo

Cordova Plugin to retrieve application information, like the App name, version, compile date and identifier. Additionally returns some device capabilities (which perhaps should be move to the device plugin).

Installation

cordova plugin add skwas-cordova-plugin-appinfo

or for latest

cordova plugin add https://github.com/skwasjer/skwas-cordova-plugin-appinfo.git

Supported platforms

Android 4.1 and higher
iOS 8 and higher (tested with Xcode 7.2.3 and Xcode 8)
Browser proxy (provided only for compatibility)

Tested with Cordova 7 and higher.

Usage

This plugin defines a global appInfo object, which provides application properties. Although the object is in the global scope, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(appInfo.name);
}

Properties

appInfo.name

Type: String

Gets the application name.

Supported platforms

  • Android (manifest/application@android:label)
  • iOS (CFBundleName)

appInfo.identifier

Type: String

Gets the application identifier.

Supported platforms

  • Android (manifest/package)
  • iOS (CFBundleIdentifier)

appInfo.version

Type: String

Gets the application version.

Supported platforms

  • Android (manifest@android:versionName)
  • iOS (CFBundleShortVersionString)

appInfo.build

Type: String

Gets the application build.

Supported platforms

  • Android (manifest@android:versionCode)
  • iOS (CFBundleVersion)

appInfo.compileDate

Type: String

Gets the datetime when the application was compiled.

Supported platforms

  • Android
  • iOS

Android quirks

When compiling for debug, the compile date returns January 1, 1970. This is on purpose to avoid changes to BuildConfig triggering full rebuilds (and allowing faster Instant Run).

appInfo.isHardwareAccelerated

Type: Boolean

Gets whether the application is using hardware acceleration.

Supported platforms

  • Android, Honeycomb upwards
  • iOS will always return true

appInfo.isDebuggable

Type: Boolean

Gets whether the application can be remotely debugged.

Supported platforms

  • Android
  • iOS

Changelog

2.0.0

  • Android: since Gradle 2.2, files in APK's no longer have timestamps, thus breaking the compileDate property. Fixed by adding a property to BuildConfig at build time.

1.0.1

  • Android: fix compile error when cordova-plugin-device is not installed

1.0.0

  • Marking v1 since it is fairly stable and not changing much.
  • Android/iOS: added build and identifier.

0.4.0

  • added Cordova 5.x support

0.3.5

  • run plugin in background as per Cordova manual

0.3.4

  • added iOS support

0.3.2

  • Android support
  • first public release