Get app version number through code

I’ve searched the forum and can’t find a question relating to this.
Is there a way to retrieve the app version number in code, or is hard coding it into a label the only option at the moment?

You’ll need to use a label since there is not a block that contains the version number.

Hardcode “Version 1.0” into your app and store (save) it in the app.

Add the app version to a website or in an online database. When you first create the app it will be “Version 1.0” ie the same as that hardcoded into your app.

When user checks the app version inside the app, fetch the app version from the website or database and compare it to the stored version in your app.

If the stored app version = fetched app version then that’s ok.

If the fetched app version is newer than the stored version you can let the user know a new version is available and they can update to it.

Each time you update the app make sure you increase the app version on the website or in the database. This way your app always fetches the latest version.

1 Like

Thanks @tatiang and @Dean_Artis

That’s what I thought. Maybe that’s something Thunkable can add to the screen or device blocks. Forgetting to update the hardcoded version number when compiling could cause issues if your comparing to an outside data variable. Thanks for the valuable input though, it’s appreciated.