Skip to content

Commit

Permalink
[release/6.0.4xx-xcode14.3] Add Xcode 14.3 Support (#17946)
Browse files Browse the repository at this point in the history
This is a backport of #17810 and #17062.
  • Loading branch information
dalexsoto authored Mar 30, 2023
2 parents 178e83d + 3ee4c21 commit 2f729d3
Show file tree
Hide file tree
Showing 135 changed files with 45,039 additions and 46,684 deletions.
2 changes: 0 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@
/src/watchkit.cs @rolfbjarne
/src/WebKit
/src/webkit.cs
/src/WKWebKit
/src/wkwebkit.cs

/tests/xharness @rolfbjarne @mandel-macaque
/tests/xtro-sharpie
Expand Down
10 changes: 5 additions & 5 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ endif

## If this branch is a release branch, set NUGET_RELEASE_BRANCH to the exact branch name (so that any other branches won't become release branches just by branching off from a release branch).
## Example: release/6.0.3xx
NUGET_RELEASE_BRANCH=release/6.0.4xx-xcode14.2
NUGET_RELEASE_BRANCH=release/6.0.4xx-xcode14.3

## If this is a pre-release (alpha, beta, rc, xcode, etc.) branch, set NUGET_HARDCODED_PRERELASE_BRANCH to the exact branch name. Also set NUGET_HARDCODED_PRELEASE_IDENTIFIER to the prerelease identifier to use.
## Example:
Expand Down Expand Up @@ -214,9 +214,9 @@ MACCATALYST_MSI_VERSION_REV=$(shell expr 45662 + $(MACCATALYST_NUGET_COMMIT_DIST
MACCATALYST_MSI_VERSION=127.251.$(MACCATALYST_MSI_VERSION_REV)

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=14.2
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14.2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.2.0.app/Contents/Developer
XCODE_VERSION=14.3
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_14.3_Release_Candidate_2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_14.3.0-rc.2.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist 2>/dev/null || echo " $(shell tput setaf 1 2>/dev/null)The required Xcode ($(XCODE_VERSION)) is not installed in $(basename $(basename $(XCODE_DEVELOPER_ROOT)))$(shell tput sgr0 2>/dev/null)" >&2)

# Tell both Xcode and our build logic which Xcode we're using.
Expand Down Expand Up @@ -251,7 +251,7 @@ MAX_SHARPIE_VERSION=3.5.99
MIN_SHARPIE_URL=https://download.visualstudio.microsoft.com/download/pr/7336f72c-57aa-4e46-9936-cce4d1975ba9/b33be8b36a22c2cfbcbe5680f14e0901/objectivesharpie-3.5.61.pkg

# Minimum OSX versions for building XI/XM
MIN_OSX_BUILD_VERSION=12.5
MIN_OSX_BUILD_VERSION=13.0
# Minimum OSX version for executing XI/XM tooling.
MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11
Expand Down
14 changes: 7 additions & 7 deletions Make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=16.1.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=9.0.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=16.5.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=9.4.0.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,11 +66,11 @@ MAC_PACKAGE_VERSION=9.0.0.$(MAC_COMMIT_DISTANCE)
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
# When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)

IOS_NUGET_OS_VERSION=16.2
TVOS_NUGET_OS_VERSION=16.1
WATCHOS_NUGET_OS_VERSION=9.1
MACOS_NUGET_OS_VERSION=13.1
MACCATALYST_NUGET_OS_VERSION=16.2
IOS_NUGET_OS_VERSION=16.4
TVOS_NUGET_OS_VERSION=16.4
WATCHOS_NUGET_OS_VERSION=9.4
MACOS_NUGET_OS_VERSION=13.3
MACCATALYST_NUGET_OS_VERSION=16.4


# Defines the default platform version if it's not specified in the TFM. The default should not change for a given .NET version:
Expand Down
7 changes: 6 additions & 1 deletion Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<string>16.0</string>
<string>16.1</string>
<string>16.2</string>
<string>16.4</string>
</array>
<key>tvOS</key>
<array>
Expand Down Expand Up @@ -85,6 +86,7 @@
<string>15.4</string>
<string>16.0</string>
<string>16.1</string>
<string>16.4</string>
</array>
<key>watchOS</key>
<array>
Expand Down Expand Up @@ -114,7 +116,7 @@
<string>8.3</string>
<string>8.5</string>
<string>9.0</string>
<string>9.1</string>
<string>9.4</string>
</array>
<key>MacCatalyst</key>
<array>
Expand All @@ -132,6 +134,7 @@
<string>15.4</string>
<string>16.1</string>
<string>16.2</string>
<string>16.4</string>
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand Down Expand Up @@ -164,6 +167,8 @@
<string>13.0</string>
<key>16.2</key>
<string>13.1</string>
<key>16.4</key>
<string>13.3</string>
</dict>
<key>RecommendedXcodeVersion</key>
<string>@XCODE_VERSION@</string>
Expand Down
1 change: 1 addition & 0 deletions Versions-mac.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<string>12.3</string>
<string>13.0</string>
<string>13.1</string>
<string>13.3</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions mk/xamarin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
endif

ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := 0837e7caffb2e42efcd183cb1d71998fb6022e2c
NEEDED_MACCORE_BRANCH := xcode14
NEEDED_MACCORE_VERSION := 52cb0860321f80c36ae2e1733c377b889ec8736b
NEEDED_MACCORE_BRANCH := main

MACCORE_DIRECTORY := maccore
MACCORE_MODULE := git@github.com:xamarin/maccore.git
Expand Down
42 changes: 42 additions & 0 deletions src/AuthenticationServices/ASCompat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// ASCompat.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2023 Microsoft Corporation
//
#if !XAMCORE_5_0

#nullable enable

using Foundation;
using ObjCRuntime;
using System;
using System.Threading.Tasks;

#if !NET
using NativeHandle = System.IntPtr;
#endif

namespace AuthenticationServices {
#if MONOMAC
public partial class ASAuthorizationProviderExtensionRegistrationHandler {
public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.BrokenBinding);
#if !NET
public Task<ASAuthorizationProviderExtensionRegistrationResult> BeginDeviceRegistrationAsync (ASAuthorizationProviderExtensionLoginManager loginManager, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
public Task<ASAuthorizationProviderExtensionRegistrationResult> BeginUserRegistrationAsync (ASAuthorizationProviderExtensionLoginManager loginManager, string userName, ASAuthorizationProviderExtensionAuthenticationMethod authenticationMethod, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
#else
public virtual Task<ASAuthorizationProviderExtensionRegistrationResult> BeginDeviceRegistrationAsync (ASAuthorizationProviderExtensionLoginManager loginManager, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
public virtual Task<ASAuthorizationProviderExtensionRegistrationResult> BeginUserRegistrationAsync (ASAuthorizationProviderExtensionLoginManager loginManager, string userName, ASAuthorizationProviderExtensionAuthenticationMethod authenticationMethod, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
#endif // !NET
}

public static partial class ASAuthorizationProviderExtensionRegistrationHandler_Extensions {
public static Task<ASAuthorizationProviderExtensionRegistrationResult> BeginDeviceRegistrationAsync (this IASAuthorizationProviderExtensionRegistrationHandler This, ASAuthorizationProviderExtensionLoginManager loginManager, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
public static Task<ASAuthorizationProviderExtensionRegistrationResult> BeginUserRegistrationAsync (this IASAuthorizationProviderExtensionRegistrationHandler This, ASAuthorizationProviderExtensionLoginManager loginManager, string userName, ASAuthorizationProviderExtensionAuthenticationMethod authenticationMethod, ASAuthorizationProviderExtensionRequestOptions options) => throw new InvalidOperationException (Constants.BrokenBinding);
}

#endif // MONOMAC
}
#endif // !XAMCORE_5_0
1 change: 1 addition & 0 deletions src/CoreWlan/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public enum CWChannelBand : ulong {
Unknown = 0,
TwoGHz = 1,
FiveGHz = 2,
SixGHz = 3,
}

[NoMacCatalyst]
Expand Down
10 changes: 10 additions & 0 deletions src/HealthKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ public enum HKFhirResourceType {
[iOS (14, 0)]
[Field ("HKFHIRResourceTypeCoverage")]
Coverage,
[iOS (16, 4), MacCatalyst (16, 4), Mac (13, 3)]
[Field ("HKFHIRResourceTypeDiagnosticReport")]
DiagnosticReport,
[iOS (16, 4), MacCatalyst (16, 4), Mac (13, 3)]
[Field ("HKFHIRResourceTypeDocumentReference")]
DocumentReference,
}

[Watch (5, 0), iOS (12, 0), Mac (13, 0)]
Expand All @@ -549,6 +555,10 @@ public enum HKClinicalTypeIdentifier {
[Watch (7, 0), iOS (14, 0)]
[Field ("HKClinicalTypeIdentifierCoverageRecord")]
CoverageRecord,
[Watch (9, 4), iOS (16, 4), Mac (13, 3)]
[MacCatalyst (16, 4)]
[Field ("HKClinicalTypeIdentifierClinicalNoteRecord")]
ClinicalNoteRecord,
}

[Watch (5,0), iOS (12,0), Mac (13,0)]
Expand Down
29 changes: 29 additions & 0 deletions src/MediaAccessibility/MediaAccessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,33 @@ static partial class MAAudibleMedia {
return result;
}
}

#if NET
[SupportedOSPlatform ("ios16.4")]
[SupportedOSPlatform ("maccatalyst16.4")]
[SupportedOSPlatform ("macos13.3")]
[SupportedOSPlatform ("tvos16.4")]
#endif
public static partial class MAVideoAccommodations {
#if NET
[SupportedOSPlatform ("ios16.4")]
[SupportedOSPlatform ("maccatalyst16.4")]
[SupportedOSPlatform ("macos13.3")]
[SupportedOSPlatform ("tvos16.4")]
#else
[Mac (13, 3), TV (16, 4), iOS (16, 4)]
#endif
[DllImport (Constants.MediaAccessibilityLibrary)]
static extern byte MADimFlashingLightsEnabled ();

#if NET
[SupportedOSPlatform ("ios16.4")]
[SupportedOSPlatform ("maccatalyst16.4")]
[SupportedOSPlatform ("macos13.3")]
[SupportedOSPlatform ("tvos16.4")]
#else
[Mac (13, 3), TV (16, 4), iOS (16, 4)]
#endif
public static bool IsDimFlashingLightsEnabled () => MADimFlashingLightsEnabled () != 0;
}
}
2 changes: 2 additions & 0 deletions src/Network/NWEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,5 +291,7 @@ public enum NWQuicStreamType {
Unknown = 0,
Bidirectional = 1,
Unidirectional = 2,
[Watch (9, 4), TV (16, 4), Mac (13, 3), iOS (16, 4), MacCatalyst (16, 4)]
Datagram = 3,
}
}
3 changes: 3 additions & 0 deletions src/UIKit/UIEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2605,6 +2605,9 @@ public enum UIWindowSceneDismissalAnimation : long {
public enum UIActivityItemsConfigurationInteraction {
[Field ("UIActivityItemsConfigurationInteractionShare")]
Share,
[iOS (16, 4), MacCatalyst (16, 4)]
[Field ("UIActivityItemsConfigurationInteractionCopy")]
Copy,
}

[NoWatch, NoTV, iOS (13,0)]
Expand Down
1 change: 0 additions & 1 deletion src/WebKit/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion src/WKWebKit/Defs.cs → src/WebKit/Defs.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// WKWebKit/Defs.cs
// WebKit/Defs.cs
//
// Authors:
// Aaron Bockover (abock@xamarin.com)
Expand Down
4 changes: 4 additions & 0 deletions src/WebKit/DomCssRuleList.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if __MACOS__

#nullable enable

namespace WebKit {
Expand All @@ -10,3 +12,5 @@ public DomCssRule this [int index] {
}
}
}

#endif // __MACOS__
4 changes: 4 additions & 0 deletions src/WebKit/DomHelpers.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if __MACOS__

#nullable enable

using System;
Expand All @@ -14,3 +16,5 @@ public partial class DomHtmlOptionsCollection {
public DomNode this [uint index] { get { return this.GetItem(index); } }
}
}

#endif // __MACOS__
4 changes: 4 additions & 0 deletions src/WebKit/DomNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#if __MACOS__

#nullable enable

using System;
Expand Down Expand Up @@ -100,3 +102,5 @@ public DomEventListener AddEventListener (string type, Action<DomEvent> callback
}
}
}

#endif // __MACOS__
4 changes: 4 additions & 0 deletions src/WebKit/Enumerators.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#if __MACOS__

#nullable enable

using System;
Expand Down Expand Up @@ -120,3 +122,5 @@ IEnumerator IEnumerable.GetEnumerator () {
}
}
}

#endif // __MACOS__
Loading

5 comments on commit 2f729d3

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ API diff for current PR / commit

.NET (No breaking changes)

✅ API diff vs stable

.NET (No breaking changes)
  • iOS: vsdrops gist (No breaking changes)
  • tvOS: vsdrops gist (No breaking changes)
  • MacCatalyst: vsdrops gist (No breaking changes)
  • macOS: vsdrops gist (No breaking changes)
  • Microsoft.iOS vs Microsoft.MacCatalyst: vsdrops (could not create gist: file 'D:\a\1\s\change-detection\results\stable-api-comparison\diff\dotnet\iOS-MacCatalyst-diff\Microsoft.iOS.Ref\ref\net6.0\Microsoft.iOS.MacCatalyst.md' does not exist)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 2f729d37ef087db51d3349b5a3386e13da2d0082 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻

All tests on macOS M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
Hash: 2f729d37ef087db51d3349b5a3386e13da2d0082 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

💻 [CI Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻

All tests on macOS M1 - Mac Ventura (13.0) passed.

Pipeline on Agent
Hash: 2f729d37ef087db51d3349b5a3386e13da2d0082 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-049.Ventura
Hash: 2f729d37ef087db51d3349b5a3386e13da2d0082 [CI build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: simulator tests.

🎉 All 77 tests passed 🎉

Tests counts

⚠️ bcl: No tests selected. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests: All 1 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ framework: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent_binding_projects: All 4 tests passed. Html Report (VSDrops) Download
⚠️ install_source: No tests selected. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 40 tests passed. Html Report (VSDrops) Download
⚠️ mac_binding_project: No tests selected. Html Report (VSDrops) Download
⚠️ mmp: No tests selected. Html Report (VSDrops) Download
⚠️ mononative: No tests selected. Html Report (VSDrops) Download
✅ monotouch: All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
⚠️ mtouch: No tests selected. Html Report (VSDrops) Download
⚠️ xammac: No tests selected. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: [CI build]

Please sign in to comment.