BundleVersionChecker icon indicating copy to clipboard operation
BundleVersionChecker copied to clipboard

track `PlayerSettings.Android.bundleVersionCode`

Open toblerpwn opened this issue 9 years ago • 10 comments

..this would be immensely helpful for us. Right now, because of how insane Unity's build numbers are in Unity 5.x, we use PlayerSettings.Android.bundleVersionCode as a shared bundle version (critical for taking Unity Cloud Build iOS builds and placing them directly in the App Store with incremented build numbers, which is now required).

Adding this value (and may as well add other version/bundle/build numbers?) would be SO AWESOME.

toblerpwn avatar Jun 22 '15 20:06 toblerpwn

Sounds goood of course :+1: At the moment I am so busy in my day to day project work, that I am not able make any extensions here - sorry. I will leave this open as a reminder when I find some time to work on a new release. I am myself missing some automatic build number and timestamp feature, which I will add one day.

kayy avatar Jun 23 '15 16:06 kayy

@kayy - if you can outline the general work that needs to be done, I can probably do it and send you a PR? I don't mind the grunt work if you can help me skip the learning curve. :D

toblerpwn avatar Jun 23 '15 16:06 toblerpwn

That sounds even better :) OK, I have a deadline at June 30 when I had to deliver stuff to 2 customers. I just set a reminder for 1st of July. Then I will take a look into the project and get back to you. It was such a long time ago that I worked on this that I need to investigate my own code - I tend to forget things after a while if I do not use them ;-)

kayy avatar Jun 23 '15 17:06 kayy

I am working on several issues and improvements. Sorry for the one week delay :-( So what is your basic idea regarding PlayerSettings.Android.bundleVersionCode? Is it just a build number for tracking your every build you make with Unity? If so, I am planning to add an automatic build number system, which is included in TrackedBundleVersionInfo. But anyway it appears to be a 10 minutes hack to include this property.

kayy avatar Jul 08 '15 20:07 kayy

(Also sorry for the delay!)

Yeah, for us the main goal is to represent / show / inspect this number at runtime.

In terms of the actual build number used, incrementing the build number manually is no trouble for us - even preferred really - but I think that's something separate. :)

toblerpwn avatar Jul 30 '15 15:07 toblerpwn

I committed a workaround on master. This provides a public member CurrentAndroidBundleVersionCode in TrackedBundleVersion.cs. So you can at least access this information at runtime. I will integrate this in version history later if I have some time. I haven't yet tested it on an Android device but it should work.

kayy avatar Jul 31 '15 10:07 kayy

Not sure if related to the same type of thing as above, but it appears as of unity 5.3.0, the motions of re-generating the files still work, but the generated files don't appear to actually update anymore. :(

runfaj avatar Dec 17 '15 22:12 runfaj

At the moment I cannot install 5.3.0 dur to ongoing projects based on older releases. So I am really sorry, but it will take a few weeks to look at it. Are there any errors or warnings?

kayy avatar Dec 18 '15 10:12 kayy

Unfortunately, no errors or warnings. As far as the log is concerned, everything looks like it updates properly, and outputs the proper info messages. However, the actual generated files don't update for some reason. For the interim, I'm just updating the generated files manually whenever a version on our app is updates.

runfaj avatar Dec 18 '15 17:12 runfaj

@toblerpwn @runfaj I'm late to the party, but it looks like if you just need the degenerate case (getting the current version in the runtime) in >5.3 you can access the version number and bundle identifier via the UnityEngine.Application class members (bundleIdentifier and version).