Skip to content

chore(versions): Vary minimum version based on compile SDK - #1663

Draft
dpogue wants to merge 3 commits into
apache:masterfrom
dpogue:recommended-minimum
Draft

chore(versions): Vary minimum version based on compile SDK#1663
dpogue wants to merge 3 commits into
apache:masterfrom
dpogue:recommended-minimum

Conversation

@dpogue

@dpogue dpogue commented Jun 9, 2026

Copy link
Copy Markdown
Member

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

  • I've run the tests to see all new and existing tests pass

@codecov-commenter

codecov-commenter commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.76%. Comparing base (21eebe9) to head (374f1ef).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GitToTheHub

Copy link
Copy Markdown
Contributor

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.

@jcesarmobile

Copy link
Copy Markdown
Member

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 breautek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dpogue

dpogue commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

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.

@dpogue

dpogue commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

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.

@dpogue

dpogue commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

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 😒

@dpogue dpogue changed the title chore(versions): Replace min versions with macros chore(versions): Vary minimum version based on compile SDK Jun 10, 2026

@breautek breautek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dpogue dpogue added this to the 8.2.0 milestone Jun 11, 2026
@GitToTheHub

Copy link
Copy Markdown
Contributor

Ok I just noted it to have less work. But if you find a good solution than it's good also.

@GitToTheHub

Copy link
Copy Markdown
Contributor

Should we bump already to 8.2.0?

@dpogue

dpogue commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Should we bump already to 8.2.0?

When we merge this we should definitely bump the minor

@GitToTheHub

Copy link
Copy Markdown
Contributor

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

@dpogue

dpogue commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

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.

@GitToTheHub

Copy link
Copy Markdown
Contributor

Ok understand :)

@dpogue
dpogue force-pushed the recommended-minimum branch from 7d421fe to 95a0483 Compare June 17, 2026 23:01
@GitToTheHub

Copy link
Copy Markdown
Contributor

I think this could be merged now?

@dpogue
dpogue force-pushed the recommended-minimum branch from 95a0483 to 6646b8c Compare August 24, 2026 07:19
dpogue added 3 commits August 24, 2026 01:16
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.
@dpogue
dpogue force-pushed the recommended-minimum branch from 6646b8c to 374f1ef Compare August 24, 2026 08:16
@dpogue

dpogue commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

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.

@GitToTheHub

Copy link
Copy Markdown
Contributor

Yeah, I think that's a good idea. XCode 27 will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants