Display Mobile App Version from RhoMobile's build.yml

Visnupriya

29 sec read

When we ship a mobile app for our clients, we always follow the practice of displaying the version number in it.
With RhoMobile development, we use to hardcode it initially but we now have a decent way to show it directly from the RhoMobile config file (build.yml)
Lets see how we can do that in RhoMobile app (iOS, Android and Windows Mobile).

The first step is to specify the version in build.yml as shown below
build_file
Now make use of the below API’s to display the version.
For Ruby
[source language=”html”]
Rho::Application.version
[/source]
For Javascript
[source language=”html”]
Rho::Application.version
[/source]
For example, you can say
[source language=”html”]
App Version: <%= Rho::Application.version %>
[/source]
that will display the version in About us page like
screen2
Hope, it will help to you to avoid multiple edit for version changes.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *