Skip to content

Add methods to UI::Application to return app build number and version number#58

Open
hboon wants to merge 1 commit into
HipByte:masterfrom
hboon:version-build-number
Open

Add methods to UI::Application to return app build number and version number#58
hboon wants to merge 1 commit into
HipByte:masterfrom
hboon:version-build-number

Conversation

@hboon

@hboon hboon commented Dec 13, 2016

Copy link
Copy Markdown
Collaborator

(main)> UI::Application.instance.build_number
=> "27"
(main)> UI::Application.instance.version_number
=> "1.0.0"

@Watson1978

Copy link
Copy Markdown
Member

I like version_string instead of version_number because version_number returns String object.

@hboon

hboon commented Dec 14, 2016

Copy link
Copy Markdown
Collaborator Author

What about build_number? It is a String on iOS, but Fixnum in Android.

@jjaffeux

Copy link
Copy Markdown
Contributor

@hboon I feel it weird to have this under the UI namespace, how is this related to UI?

@andrewhavens

Copy link
Copy Markdown
Collaborator

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.

@Watson1978

Copy link
Copy Markdown
Member

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.

@hboon

hboon commented Dec 15, 2016

Copy link
Copy Markdown
Collaborator Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants