Display Mobile App Version from RhoMobile's build.yml


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
Now make use of the below API’s to display the version.
For Ruby
[source language=”html”]
For Javascript
[source language=”html”]
For example, you can say
[source language=”html”]
App Version: <%= Rho::Application.version %>
that will display the version in About us page like
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 *