1.0.1 • Published 11 months ago
check-store-version v1.0.1
Status: Developing ⚠️
💻 Getting started
Requirements
- The app must already be published.
- Need to specify bundleIndentfier and buildNumber in app.json file.
Installing
npm i check-store-version
Using
import checkVersion from "check-store-version";
checkVersion is an asynchronous function that receives as a parameter the app's id on the Google Play Store, the app's id on the App Store, and the location (example: 'us', 'br'...)
const verifyUpdateStore = async () => {
try {
const check = await checkVersion(
"br.com.company.app",
"1213478177",
"br"
);
console.log(check);
if (check.result === "new") {
}
} catch (e) {}
};
The function returns an object with the following properties:
- local (local version).
- remote (remote version).
- result ('new' or 'old').
- detail ('remote > local', 'remote < local', 'remote === local').
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.