Allowing override LastUpgradeCheck and LastUpgradeVersion#1013
Allowing override LastUpgradeCheck and LastUpgradeVersion#1013yonaskolb merged 5 commits intoyonaskolb:masterfrom Andre113:last-upgrade-override
Conversation
| if !projectAttributes.contains(where: { (key, value) -> Bool in | ||
| key == lastUpgradeKey && value is String | ||
| }) { | ||
| projectAttributes[lastUpgradeKey] = project.xcodeVersion |
There was a problem hiding this comment.
This code is the same as before, but it only replaces the key if it's a string, correct? Were you running into cases where devs were putting numbers in the project attributes?
There was a problem hiding this comment.
Almost. It will replace the key if the user did not specify a value for LastUpgradeCheck or if this value is not a string. In this case, it will keep the same behavior as today, using the project.xcodeVersion value.
I just felt it would be safer to validade if the value we're inserting is a String to avoid any strange values.
|
Thanks @Andre113. Could you add a changelog entry as well |
Sure! Just updated it. I also modified the readme to update the information regard the |
|
Thanks @Andre113. We’ve had a release since you added your change log entry so could you move it up into the Next Version section |
Oops. |
Xcode will check for the value of
LastUpgradeCheckandLastUpgradeVersionto display some warnings related to a recommended iOS deployment target. Just like this:In some cases, it is not possible to change the deployment target because we still have to support some old iOS versions, and then the warnings stays there forever. This is really bad when we have a large number of targets.
With these changes, we can specify a different value for
LastUpgradeCheckinproject.yml. Like this:This way, the warnings should be gone.