-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import {Plugin, Cordova} from './plugin'; | ||
|
||
/** | ||
* Reads the version of your app from the target build settings. | ||
* | ||
* Requires Cordova plugin: cordova-plugin-appversion. For more info, please see the [cordova-plugin-version docs](ttps://github.com/whiteoctober/cordova-plugin-app-version). | ||
* | ||
* ``` | ||
* ionic plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git | ||
* ```` | ||
* | ||
* @usage | ||
* ```js | ||
* AppVersion.getAppName(); | ||
* AppVersion.getPackageName(); | ||
* AppVersion.getVersionCode(); | ||
* AppVersion.getVersionNumber(); | ||
* ``` | ||
*/ | ||
@Plugin({ | ||
name: 'AppRate', | ||
plugin: 'cordova-plugin-appversion', | ||
pluginRef: 'cordova.getAppVersion' | ||
}) | ||
export class AppVersion { | ||
|
||
/** | ||
* Returns the name of the app | ||
*/ | ||
@Cordova | ||
static getAppName () : string { | ||
return; | ||
} | ||
|
||
/** | ||
* Returns the package name of the app | ||
*/ | ||
@Cordova | ||
static getPackageName () : string { | ||
return; | ||
} | ||
|
||
/** | ||
* Returns the build identifier of the app | ||
*/ | ||
@Cordova | ||
static getVersionCode () : string { | ||
return; | ||
} | ||
|
||
/** | ||
* Returns the version of the app | ||
*/ | ||
@Cordova | ||
static getVersionNumber () : string { | ||
return; | ||
} | ||
|
||
} |