You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
This change is flawed. It ruins the former logic of yyyy.mm.ddhhmm I now get version 2020.712.7121335 when creating and submitting builds to Apple. Where as I got version 2020.12.101432 in my prior build. Sorry, I don't remember what version of Solar2D I upgraded from. Besides there is nothing wrong with leading zeros in date structures, it makes it easy to parse in backend.
The reason will be displayed to describe this comment to others. Learn more.
That you now make the version number a different format, a longer data format, which require changes to database and mess up my login logic and backend. Now I made changes in my build settings to preserve the original way. I read the other case, and will be testing this claim, which hasn't been an issue for 8 years. I use the original format to block previous builds on startup.
The reason will be displayed to describe this comment to others. Learn more.
For your specific case I suggest you your dynamically generated string into your build settings or drop leading 7s. You can’t have month or day in 7 hundreds.
The reason will be displayed to describe this comment to others. Learn more.
For my specific case? It's the best case for everyone to drop the your 7 and the leading zero. And you can fix it! You can just make a clause (year>2020) for the year 2021 to change and revert and fix it the right way in in builds made after New Years. Because coming new year the major version number will be the dominant factor for version control.
The reason will be displayed to describe this comment to others. Learn more.
Here you go. A demo to fix for the hack. Next year you can simplify it, when the 7 hack become obsolete, because everyone will build 2021 versions.
local futuredate = os.time()+5000000
local version = os.date("%Y.7%m.7%d%H%M",futuredate)
print(version) -- hack build number
if tonumber(os.date("%Y",futuredate)) > 2020 then
local datedata = os.date( "*t", futuredate)
version = datedata.year .. '.' .. datedata.month.."." .. datedata.day .. os.date("%H%M",futuredate)
end
print(version) -- future build number
The reason will be displayed to describe this comment to others. Learn more.
Next years code will simply be
local datedata = os.date( "*t")
infoPlist.CFBundleVersion = datedata.year .. '.' .. datedata.month.."." .. datedata.day .. os.date("%H%M")
The reason will be displayed to describe this comment to others. Learn more.
And now that we're improving everything, why not make it UTC time, so builds made by my colleagues in Australia and USA doesn't make a build number smaller than mine.
The reason will be displayed to describe this comment to others. Learn more.
Sorry. This won't work. If some users would use older version to build their app in next year than update, it Apple won't accept their updates because bundle version would be lower. It is out of the box now, I can not put it back. Why don't you write same code in your build.settings?
The reason will be displayed to describe this comment to others. Learn more.
Then they can change their CFBundleVersion!!! You got to fix what you ruined! I'm giving up on this platform and sponsering, if bad choices is going to be the dominating factor. I will be afraid of the next choices you make and doubt this platform will become anything but abandonware.
The reason will be displayed to describe this comment to others. Learn more.
From one hand: you have clear work around, which consists of 2 lines of code.
From another, I will break updates for anyone, who used latest versions of Solar2D. Literally people would not be able to update their apps, would face mystical errors from Apple on upload and don't know what to do.
Format of Bundle ID was never documented anywhere, and is not part of any API. I have no idea someone would rely on it. If you want, I can make you a special build, with old style bundle ID and everything else updated, this isn't hard for me and you would be able to continue use the engine. Would you prefer that?
Is there any particular reason you need CFBundleVersion to stay old way?
The reason will be displayed to describe this comment to others. Learn more.
This got out of hand fast.
I am very sorry this change breaks your assumptions of how Solar2D builds its CFBundleVersion. They never was part of public API or documented anywhere. My suggested solution is to add following 2 lines to the end of your build.settings file:
Alternatively, you can ask me to make you a special build, like this one in case adding 2 lines to build.settings is impossible somehow.
I am sorry for inconvenience, and would love to implement a solution which would not block people from updating their apps.
Thanks
The reason will be displayed to describe this comment to others. Learn more.
I am closing this conversation. At this point there is are clear workarounds. If you want a fix, create a pull request which would not break people builds.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is flawed. It ruins the former logic of yyyy.mm.ddhhmm I now get version 2020.712.7121335 when creating and submitting builds to Apple. Where as I got version 2020.12.101432 in my prior build. Sorry, I don't remember what version of Solar2D I upgraded from. Besides there is nothing wrong with leading zeros in date structures, it makes it easy to parse in backend.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what the problem? Your new build bundle number is higher than previous.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #199 for details
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That you now make the version number a different format, a longer data format, which require changes to database and mess up my login logic and backend. Now I made changes in my build settings to preserve the original way. I read the other case, and will be testing this claim, which hasn't been an issue for 8 years. I use the original format to block previous builds on startup.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are you going to change it to the right format by removing the leading zeros? Or are we going to live with this hack for ever?
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m very sorry. I can’t change it now. Because then new builds would have numerically smaller bundle version than 7xx builds.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For your specific case I suggest you your dynamically generated string into your build settings or drop leading 7s. You can’t have month or day in 7 hundreds.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my specific case? It's the best case for everyone to drop the your 7 and the leading zero. And you can fix it! You can just make a clause (year>2020) for the year 2021 to change and revert and fix it the right way in in builds made after New Years. Because coming new year the major version number will be the dominant factor for version control.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you go. A demo to fix for the hack. Next year you can simplify it, when the 7 hack become obsolete, because everyone will build 2021 versions.
local futuredate = os.time()+5000000
local version = os.date("%Y.7%m.7%d%H%M",futuredate)
print(version) -- hack build number
if tonumber(os.date("%Y",futuredate)) > 2020 then
local datedata = os.date( "*t", futuredate)
version = datedata.year .. '.' .. datedata.month.."." .. datedata.day .. os.date("%H%M",futuredate)
end
print(version) -- future build number
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next years code will simply be
local datedata = os.date( "*t")
infoPlist.CFBundleVersion = datedata.year .. '.' .. datedata.month.."." .. datedata.day .. os.date("%H%M")
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But time is of the essence. The later you fix the hack, the less likely people will be update before next year.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And now that we're improving everything, why not make it UTC time, so builds made by my colleagues in Australia and USA doesn't make a build number smaller than mine.
local datedata = os.date( "!*t")
infoPlist.CFBundleVersion = datedata.year .. '.' .. datedata.month.."." .. datedata.day .. os.date("%H%M")
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. This won't work. If some users would use older version to build their app in next year than update, it Apple won't accept their updates because bundle version would be lower. It is out of the box now, I can not put it back. Why don't you write same code in your
build.settings
?a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then they can change their CFBundleVersion!!! You got to fix what you ruined! I'm giving up on this platform and sponsering, if bad choices is going to be the dominating factor. I will be afraid of the next choices you make and doubt this platform will become anything but abandonware.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From one hand: you have clear work around, which consists of 2 lines of code.
From another, I will break updates for anyone, who used latest versions of Solar2D. Literally people would not be able to update their apps, would face mystical errors from Apple on upload and don't know what to do.
Format of Bundle ID was never documented anywhere, and is not part of any API. I have no idea someone would rely on it. If you want, I can make you a special build, with old style bundle ID and everything else updated, this isn't hard for me and you would be able to continue use the engine. Would you prefer that?
Is there any particular reason you need CFBundleVersion to stay old way?
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here. In a hour this build will be built: https://github.com/coronalabs/corona/actions/runs/418881292
You can use it and get Bundle Version as you want it.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got out of hand fast.
I am very sorry this change breaks your assumptions of how Solar2D builds its CFBundleVersion. They never was part of public API or documented anywhere. My suggested solution is to add following 2 lines to the end of your
build.settings
file:Alternatively, you can ask me to make you a special build, like this one in case adding 2 lines to build.settings is impossible somehow.
I am sorry for inconvenience, and would love to implement a solution which would not block people from updating their apps.
Thanks
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am closing this conversation. At this point there is are clear workarounds. If you want a fix, create a pull request which would not break people builds.
a365b4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You always welcome to reach me via my personal email or on Discord