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).
cordova plugin add skwas-cordova-plugin-appinfo
or for latest
cordova plugin add https://github.com/skwasjer/skwas-cordova-plugin-appinfo.git
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.
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.
Gets the application name.
- Android (manifest/application@android:label)
- iOS (CFBundleName)
Gets the application identifier.
- Android (manifest/package)
- iOS (CFBundleIdentifier)
Gets the application version.
- Android (manifest@android:versionName)
- iOS (CFBundleShortVersionString)
Gets the application build.
- Android (manifest@android:versionCode)
- iOS (CFBundleVersion)
Gets the datetime when the application was compiled.
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).
Gets whether the application is using hardware acceleration.
- Android, Honeycomb upwards
- iOS will always return true
Gets whether the application can be remotely debugged.
- Android: since Gradle 2.2, files in APK's no longer have timestamps, thus breaking the
compileDateproperty. Fixed by adding a property to
BuildConfigat build time.
- Android: fix compile error when cordova-plugin-device is not installed
- Marking v1 since it is fairly stable and not changing much.
- Android/iOS: added build and identifier.
- added Cordova 5.x support
- run plugin in background as per Cordova manual
- added iOS support
- Android support
- first public release