chore(versions): Vary minimum version based on compile SDK - #1663
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1663 +/- ##
=======================================
Coverage 81.76% 81.76%
=======================================
Files 17 17
Lines 5161 5161
=======================================
Hits 4220 4220
Misses 941 941 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I would suggest to raise the minimum iOS vesion to 15. iOS 15 is still supported by Apple and get security updates: https://support.apple.com/de-de/100100. The latest iOS 15 version is iOS 15.8.8 released on 11th May 2026. Everything lower will not get security updates and is a security risk. The oldest device supported by iOS 15 is the iPhone 6s and all devices which support iOS 13 and 14 can be updated to 15. iPhone 6 for e.g. supports maximum iOS 12.5.8. I don't see why we should support unsupported versions by Apple which can be updated. |
|
We should bump the minimum iOS version to 15 in next major, but would still need this (or something else, haven't really evaluated the change), as a patch release, unless we plan to release the major very soon. |
breautek
left a comment
There was a problem hiding this comment.
Not sure if the removal of SUPPORTED_PLATFORMS or TARGETED_DEVICE_FAMILY is intentional. Doesn't seem to be related to the deployment target change documented.
That was intentional because they were getting set to one value at the project level and then (inconsistently) getting set to different values at the target level. We ideally want them to be consistent for the whole project so I updated the project values and removed the per-target overrides. |
|
Bumping our default to iOS 15 would involve a major version bump, which I was hoping to hold off for a while. Our next major should also remove all our deprecated API and include some other fairly significant changes, and that's going to cause a bunch of older plugins to break and for people to avoid upgrading out of fear. There are a lot of people who hang around on old Cordova versions because upgrading causes everything to break, and we need to make the process as painless as possible for them. I'm going to look at a slightly different approach here that would accomplish the same result (bumping the minimum to iOS 15 but only in Xcode 27) but with more guarantees around the actual minimum version number being used. |
|
I pushed another commit here to explicitly vary based on SDK rather than the magic "recommended" minimum value. It's clearer what's going on, but I still don't like it. Thanks Apple 😒 |
breautek
left a comment
There was a problem hiding this comment.
I think what we have here is good for a patch -- the minimum of 15 is coming from SDK/xcode 27 -- and not from Cordova as a framework.
|
Ok I just noted it to have less work. But if you find a good solution than it's good also. |
|
Should we bump already to 8.2.0? |
When we merge this we should definitely bump the minor |
|
Ok, i was just asking because 3 PRs with the 8.2.0 milestone were already merged https://github.com/apache/cordova-ios/milestone/17?closed=1 |
|
None of them introduce new features, so none of them technically require a minor version bump. But I'm tagging the milestone with the assumption that we'll move right to a 8.2.0 release without doing an 8.1.1. |
|
Ok understand :) |
7d421fe to
95a0483
Compare
|
I think this could be merged now? |
95a0483 to
6646b8c
Compare
Xcode is getting more strict about minimum supported OS requirements, what used to be a warning about version numbers being out of range is being turned into an error. To avoid needing to raise our actual minimum OS version unnecessarily, we can use an Xcode macro that automatically results in the minimum supported OS version in the current Xcode version. These macros were introduced in Xcode 14, which is older than our minimum Xcode requirement. The end result of this is that the realistic minimum supported OS version for a Cordova app will be determined by the Xcode version used to build it. It doesn't seem to care about the minimum version declared in Package.swift and whether that's in the range of supported versions or not. I would feel better if there were a way to use this conditionally and still set a hardcoded minimum, or a way to see clearly what the Xcode-supported minimum is, but I can't see a way to do that without delving into complex xcconfig chaining :(
Rather than using the (very unclear) macro for the recommended target version, we can explicitly vary the target version based on the SDK being used to compile. Since the SDK is tied to the Xcode version, this allows us to declare that our minimum iOS version is 13.0, except in Xcode 27 where it's 15.0. Documenting this behaviour is still going to be a pain, but Xcode really doesn't seem to want to give us any other choices here. I left the CordovaTests project still targeting the recommended SDK since that's effectively a development project and doesn't impact Cordova consumers.
6646b8c to
374f1ef
Compare
|
I feel like we should hold off on merging this until Xcode 27 is actually released and we can confirm it works with the final version. |
|
Yeah, I think that's a good idea. XCode 27 will be released soon. |
Platforms affected
iOS
Motivation and Context
Xcode is getting more strict about minimum supported OS requirements, what used to be a warning about version numbers being out of range is being turned into an error. In Xcode 27 beta 1, our minimum of 13.0 is an error because the lowest supported target version is 15.0.
Description
To avoid needing to raise our actual minimum OS version unnecessarily, we can use an Xcode macro that automatically results in the minimum supported OS version in the current Xcode version. These macros were introduced in Xcode 14, which is older than our minimum Xcode requirement.
The end result of this is that the realistic minimum supported OS version for a Cordova app will be determined by the Xcode version used to build it.
It doesn't seem to care about the minimum version declared in Package.swift and whether that's in the range of supported versions or not.
I would feel better if there were a way to use this conditionally and still set a hardcoded minimum, or a way to see clearly what the Xcode-supported minimum is, but I can't see a way to do that without delving into complex xcconfig chaining :(
Testing
Opened the project and ran tests in Xcode 27 beta 1 with no issues.
Checklist