Open hboon opened 7 years ago
I like version_string
instead of version_number
because version_number
returns String object.
What about build_number
? It is a String on iOS, but Fixnum in Android.
@hboon I feel it weird to have this under the UI namespace, how is this related to UI?
I think build_number
and version_number
are fine. I think most people think of "version number" as something like 1.0.0
, not as a literal integer or float. The fact that it is represented as a string is secondary. I don't think version_string
is as obvious or necessary.
What about build_number? It is a String on iOS, but Fixnum in Android.
@hboon it may not be a problem, because CFBundleShortVersionString allow only numbers. However, I think that it is necessary to clarify it in the document that these methods return string.
@jjaffeux I thought of that yesterday too. It is a little out of place. I added it there originally because I'd only used UI Flow at the moment and it has a UI:Application class. Any suggestion for a better place? The other "modules" don't seem suitable either.
(main)> UI::Application.instance.build_number => "27" (main)> UI::Application.instance.version_number => "1.0.0"