You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(res.isNeeded); // false; because the second field of current and the lastest versions are the same as 1.
73
+
});
74
+
63
75
```
64
76
65
77
## Methods
66
78
79
+
-**`getPackageName()`**_(String)_ - Returns package name of app.
80
+
-**`getCurrentBuildNumber()`**_(Number)_ - Returns current app build number.
67
81
-**`getCurrentVersion()`**_(String)_ - Returns current app version.
68
-
-**`getLatestVersion()`**_(String)_ - Returns the latest app version parsed from market. Returns `null` when parsing error occurs.
69
-
-**`needUpdate(depth : Number, delimiter : String)`**_(Bool)_ - Returns `true` if app needs update, `false` otherwise. Current and the latest app versions are first splitted by delimiter(`'.'` by default), and check each splitted numbers into depth(`Infinity` by default).
82
+
-**`getLatestVersion()`**_(Promise)_ - Returns the latest app version parsed from market. Returns `null` when parsing error occurs.
83
+
-**`needUpdate(depth : Number, delimiter : String)`**_(Promise)_ - Returns `{ isNeeded: true, version: latestVersion }` if app needs update, `{ isNeeded: false, version: latestVersion }` otherwise. Current and the latest app versions are first splitted by delimiter(`'.'` by default), and check each splitted numbers into depth(`Infinity` by default).
0 commit comments