mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-25 04:16:09 +08:00
docs(app-version): explain results (#2582)
* fix(app-version): fix getVersionCode to return number as is in the actual implementation. Also update and clarify the method docs * fix(app-version): fix getVersionCode for compatibility with Android and iOS at the same time
This commit is contained in:
parent
28a1b83d1d
commit
3f9311090d
@ -37,28 +37,30 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
export class AppVersion extends IonicNativePlugin {
|
export class AppVersion extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the app
|
* Returns the name of the app, e.g.: "My Awesome App"
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAppName(): Promise<string> { return; }
|
getAppName(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the package name of the app
|
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getPackageName(): Promise<string> { return; }
|
getPackageName(): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build identifier of the app
|
* Returns the build identifier of the app.
|
||||||
* @returns {Promise<string>}
|
* In iOS a string with the build version like "1.6095"
|
||||||
|
* In Android a number generated from the version string, like 10203 for version "1.2.3"
|
||||||
|
* @returns {Promise<string | number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getVersionCode(): Promise<string> { return; }
|
getVersionCode(): Promise<string | number> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the version of the app
|
* Returns the version of the app, e.g.: "1.2.3"
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user