-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Cordova build number properties #4048
Conversation
@srounce: Before we can merge your pull request, you'll need to sign the Meteor Contributor Agreement: https://contribute.meteor.com/ |
Signed. |
Also, out of interest, where do I add tests for this? Thx |
Can you explain how is |
It allows developers to specify a build number in their Cordova properties (as explained in the cordova docs), making CI with Cordova (and automated device provisioning) a possibility. This PR allows one to do as follows:
Currently the
Does this answer your questions? |
I think this is a great PR, going to merge it with a minor tweak. Thanks. |
Yes, good shout on my silly type inference, reads a lot more clearly now. |
I am testing right now, this change breaks the builds:
|
Ugh, after some trial and error, here is my "fix" (or rather a hack) to make it work consistently: var defaultBuildNumber = (Date.now() % 1000000).toString(); |
@Slava I'm a little confused, is the modulo expression due to android not accepting build numbers over a certain size? |
@srounce my understanding of the problem is pretty limited, but my believe is - there is some limitation on the string length and it is smaller than a 32bit integer. |
Just came across this issue while trying to fix apps seemingly randomly refusing to install on an Android device. It turns out this is due to Android not allowing installs with version codes that are lower than the existing one (it fails with The problem didn't manifest itself before because cordova-android used the Unless someone has a better idea, I think I'll remove the default build number (while still allowing specifying a |
This PR allows the use of tools such as TestFlight to push multiple builds of the same app version by allowing the setting of a
buildNumber
property in mobile-settings.json.