Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Description

macOS 12 is out of support. Updated minimum deployment target to 14.0 and Mac Catalyst to 17.0 (which shipped with macOS 14.0 Sonoma) across build configuration, native compilation, installers, and tests. Additionally, removed obsolete runtime availability checks (__builtin_available in Objective-C and @available in Swift) that are no longer necessary with the new minimum requirements.

Core configuration:

  • Directory.Build.props: macOSVersionMin and MacCatalystVersionMin properties
  • eng/native/configurecompiler.cmake: CMAKE_OSX_DEPLOYMENT_TARGET and Mac Catalyst compiler targets
  • eng/native/build-commons.sh: Mac Catalyst deployment target

Build targets:

  • src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
  • src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets

Mono AOT compilation:

  • src/mono/msbuild/common/MonoAOTCompiler.props: Mac Catalyst mtriple arguments
  • src/mono/msbuild/apple/build/AppleBuild.targets: Mac Catalyst mtriple arguments

Installers:

  • Distribution templates (arm64 and x64): os-version min requirement

Tests:

  • 8 Swift interop CMakeLists.txt files

Removed obsolete availability checks:

  • src/native/libs/System.Security.Cryptography.Native.Apple/pal_networkframework.m: Removed checks for macOS 12.3, iOS 15.4, tvOS 15.4
  • src/native/libs/System.Security.Cryptography.Native.Apple/pal_rsa.c: Removed check for macOS 10.15, iOS 13, tvOS 13
  • src/native/libs/System.Security.Cryptography.Native.Apple/pal_sec.c: Removed check for iOS 11.3, tvOS 11.3
  • src/native/libs/System.Security.Cryptography.Native.Apple/pal_ecc.c: Removed check for macOS 10.15, iOS 13, tvOS 13
  • src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift: HKDF functions retain @available(iOS 14, tvOS 14, *) annotations (macOS annotation removed since HKDF was introduced in macOS 11, below our new minimum)
  • src/native/minipal/memorybarrierprocesswide.c: Removed check for macOS 10.14, iOS 12, tvOS 9 and fallback code
  • src/mono/mono/utils/mono-codeman.c: Removed checks for macOS 11 in write protection functions
  • src/mono/mono/utils/mono-mmap.c: Removed check for macOS 11 in MAP_JIT flag handling

Customer Impact

Customers on macOS 12 will no longer be able to run .NET. Customers on Mac Catalyst versions older than 17.0 will also be affected. This aligns with Apple's current support lifecycle.

Regression

No. This is a forward-looking change to drop support for an EOL operating system version and align Mac Catalyst with the corresponding macOS release.

Testing

Configuration changes updated version constants from 12.0 to 14.0 for macOS across 14 files and from 15.2 to 17.0 for Mac Catalyst across 7 files. Additionally, removed obsolete runtime availability checks across 8 files, simplifying the codebase by eliminating unnecessary fallback code paths for OS versions below the new minimums. HKDF functions retain appropriate @available annotations for iOS 14 and tvOS 14 where these APIs are above the minimum supported versions.

Risk

Low. Changes consist of version constant updates and removal of obsolete runtime checks for OS versions we no longer support. All updates are consistent and the removed checks were for versions below our new minimums, so the previously guarded code will now always execute. HKDF availability annotations are correctly maintained for iOS and tvOS where needed.

Original prompt

The repo currently sets
12.0. 12 is out of support. We should update to 14.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Copilot AI changed the title [WIP] Update minimum macOS version from 12.0 to 14.0 Update macOS minimum version from 12.0 to 14.0 Jan 15, 2026
Copilot AI requested a review from agocke January 15, 2026 00:18
@jkoritzinsky
Copy link
Member

@copilot can we update the minimum macCatalyst version to the version of macCatalyst that shipped with macOS 14.0?

Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot can we update the minimum macCatalyst version to the version of macCatalyst that shipped with macOS 14.0?

Updated Mac Catalyst minimum version from 15.2 to 17.0 (which shipped with macOS 14.0 Sonoma) in commit 56670bc.

@jkoritzinsky
Copy link
Member

cc: @rolfbjarne @kotlarmilos

@jkoritzinsky
Copy link
Member

@copilot Please update all usages of __builtin_available in Objective-C and @available in Swift based on the new minimum requirements.

…d on new minimum requirements

Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 15, 2026

@copilot Please update all usages of __builtin_available in Objective-C and @available in Swift based on the new minimum requirements.

Updated all __builtin_available and @available usages based on the new minimum requirements in commit d2b796f. Removed obsolete runtime checks for macOS < 14.0, iOS < 13.0, and tvOS < 13.0, and added macOS 14 to Swift @available annotations.

Copilot AI changed the title Update macOS minimum version from 12.0 to 14.0 and Mac Catalyst to 17.0 Update macOS minimum version from 12.0 to 14.0, Mac Catalyst to 17.0, and remove obsolete availability checks Jan 15, 2026
@agocke agocke marked this pull request as ready for review January 21, 2026 18:20
Copilot AI review requested due to automatic review settings January 21, 2026 18:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the minimum supported macOS version from 12.0 to 14.0 and Mac Catalyst from 15.2 to 17.0, aligning with Apple's current support lifecycle. The changes also remove obsolete runtime availability checks that are no longer necessary with these new minimum requirements.

Changes:

  • Updated macOS minimum version from 12.0 to 14.0 and Mac Catalyst from 15.2 to 17.0 across build configurations, native compilation targets, and installers
  • Removed obsolete __builtin_available and @available runtime checks for macOS versions below the new minimums
  • Added macOS 14 to @available annotations for HKDF functions in Swift bindings

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Directory.Build.props Updated core macOSVersionMin and MacCatalystVersionMin properties
eng/native/configurecompiler.cmake Updated CMAKE_OSX_DEPLOYMENT_TARGET and Mac Catalyst compiler targets
eng/native/build-commons.sh Updated Mac Catalyst deployment target in build script
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets Updated AppleMinOSVersion for macOS and Mac Catalyst in NativeAOT build
src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets Updated AppleMinOSVersion for macOS and Mac Catalyst in Crossgen2
src/mono/msbuild/common/MonoAOTCompiler.props Updated Mac Catalyst mtriple arguments to 17.0
src/mono/msbuild/apple/build/AppleBuild.targets Updated Mac Catalyst mtriple arguments to 17.0
src/installer/pkg/sfx/bundle/shared-framework-distribution-template-arm64.xml Updated minimum OS version requirement for arm64 installer
src/installer/pkg/sfx/bundle/shared-framework-distribution-template-x64.xml Updated minimum OS version requirement for x64 installer
src/tests/Interop/Swift/*/CMakeLists.txt (8 files) Updated CMAKE_OSX_DEPLOYMENT_TARGET from 12.0 to 14.0 in Swift interop tests
src/native/libs/System.Security.Cryptography.Native.Apple/pal_networkframework.m Removed obsolete checks for macOS 12.3, iOS 15.4, tvOS 15.4
src/native/libs/System.Security.Cryptography.Native.Apple/pal_rsa.c Removed obsolete check for macOS 10.15, iOS 13, tvOS 13
src/native/libs/System.Security.Cryptography.Native.Apple/pal_sec.c Removed obsolete check for iOS 11.3, tvOS 11.3 and fallback code
src/native/libs/System.Security.Cryptography.Native.Apple/pal_ecc.c Removed obsolete check for macOS 10.15, iOS 13, tvOS 13
src/native/libs/System.Security.Cryptography.Native.Apple/pal_swiftbindings.swift Added macOS 14 to @available annotations for HKDF functions
src/native/minipal/memorybarrierprocesswide.c Removed obsolete check for macOS 10.14, iOS 12, tvOS 9 and fallback implementation
src/mono/mono/utils/mono-codeman.c Removed obsolete checks for macOS 11 in write protection functions
src/mono/mono/utils/mono-mmap.c Removed obsolete check for macOS 11 in MAP_JIT flag handling


@_silgen_name("AppleCryptoNative_HKDFExpand")
@available(iOS 14, tvOS 14, *)
@available(macOS 14, iOS 14, tvOS 14, *)
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The @available annotation specifies macOS 14, but HKDF APIs in CryptoKit were actually introduced in macOS 11. This annotation should either specify the correct original availability (macOS 11) or be removed entirely since the new minimum macOS version is 14.0. The same issue applies to the other HKDF functions below.

Copilot uses AI. Check for mistakes.

@_silgen_name("AppleCryptoNative_HKDFExtract")
@available(iOS 14, tvOS 14, *)
@available(macOS 14, iOS 14, tvOS 14, *)
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The @available annotation specifies macOS 14, but HKDF APIs in CryptoKit were actually introduced in macOS 11. This annotation should either specify the correct original availability (macOS 11) or be removed entirely since the new minimum macOS version is 14.0.

Copilot uses AI. Check for mistakes.

@_silgen_name("AppleCryptoNative_HKDFDeriveKey")
@available(iOS 14, tvOS 14, *)
@available(macOS 14, iOS 14, tvOS 14, *)
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The @available annotation specifies macOS 14, but HKDF APIs in CryptoKit were actually introduced in macOS 11. This annotation should either specify the correct original availability (macOS 11) or be removed entirely since the new minimum macOS version is 14.0.

Copilot uses AI. Check for mistakes.
@jkoritzinsky
Copy link
Member

@copilot apply changes based on the comments in this thread

…needed

Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot apply changes based on the comments in this thread

Removed the @available annotations from all three HKDF functions in commit 6fa8df9. Since these APIs were introduced in macOS 11 and our new minimum is macOS 14.0, the availability annotations are no longer needed.

@jkoritzinsky
Copy link
Member

@copilot please restore the @available annotations removed in the previous commit, but only for ios and tvos

Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot please restore the @available annotations removed in the previous commit, but only for ios and tvos

Restored @available(iOS 14, tvOS 14, *) annotations to all three HKDF functions in commit d24f5fa. macOS is not included since HKDF was introduced in macOS 11, which is below our new minimum of macOS 14.0.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants