Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ NUGET_RELEASE_BRANCH=release/10.0.1xx
##
## Note that the prerelease identifier should be as short as possible, because otherwise
## the resulting package name can become too long for MSIs.
NUGET_HARDCODED_PRERELEASE_IDENTIFIER=xcode26.2
NUGET_HARDCODED_PRERELEASE_BRANCH=xcode26.2
NUGET_HARDCODED_PRERELEASE_IDENTIFIER=xcode26.4
NUGET_HARDCODED_PRERELEASE_BRANCH=xcode26.4

# compute the alphanumeric version of branch names
NUGET_RELEASE_BRANCH_ALPHANUMERIC:=$(shell export LANG=C; printf "%s" "$(NUGET_RELEASE_BRANCH)" | tr -c '[a-zA-Z0-9-]' '-')
Expand Down Expand Up @@ -207,10 +207,10 @@ MACCATALYST_NUGET_VERSION_NO_METADATA=$(MACCATALYST_NUGET_VERSION)$(NUGET_PREREL
MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=26.3
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_26.3.xip
XCODE_VERSION=26.4
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_26.4_beta_2.xip
ifndef IS_LINUX
XCODE_DEVELOPER_ROOT=/Applications/Xcode_26.3.0.app/Contents/Developer
XCODE_DEVELOPER_ROOT=/Applications/Xcode_26.4.0-beta2.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)

# We define stable Xcode as the Xcode app being named like "Xcode_#.#[.#].app"
Expand Down
9 changes: 4 additions & 5 deletions Make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# IMPORTANT: There must be *no* managed API differences unless the two first
# numbers (major.minor) changes.

IOS_NUGET_OS_VERSION=26.2
TVOS_NUGET_OS_VERSION=26.2
MACOS_NUGET_OS_VERSION=26.2
MACCATALYST_NUGET_OS_VERSION=26.2
IOS_NUGET_OS_VERSION=26.4
TVOS_NUGET_OS_VERSION=26.4
MACOS_NUGET_OS_VERSION=26.4
MACCATALYST_NUGET_OS_VERSION=26.4

# The following are the OS versions we first supported with the current .NET version.
# These versions must *not* change with minor .NET updates, only major .NET releases.
Expand Down Expand Up @@ -133,4 +133,3 @@ SUPPORTED_API_VERSIONS_IOS+=$(BETA_API_VERSIONS_IOS)
SUPPORTED_API_VERSIONS_TVOS+=$(BETA_API_VERSIONS_TVOS)
SUPPORTED_API_VERSIONS_MACOS+=$(BETA_API_VERSIONS_MACOS)
SUPPORTED_API_VERSIONS_MACCATALYST+=$(BETA_API_VERSIONS_MACCATALYST)

4 changes: 4 additions & 0 deletions builds/Versions-MacCatalyst.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>SupportedTargetPlatformVersions</key>
Expand Down Expand Up @@ -64,6 +65,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand Down Expand Up @@ -124,6 +126,8 @@
<string>26.1</string>
<key>26.2</key>
<string>26.2</string>
<key>26.4</key>
<string>26.4</string>
</dict>
<key>RecommendedXcodeVersion</key>
<string>@XCODE_VERSION@</string>
Expand Down
2 changes: 2 additions & 0 deletions builds/Versions-iOS.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>SupportedTargetPlatformVersions</key>
Expand Down Expand Up @@ -100,6 +101,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
2 changes: 2 additions & 0 deletions builds/Versions-macOS.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>SupportedTargetPlatformVersions</key>
Expand Down Expand Up @@ -62,6 +63,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
2 changes: 2 additions & 0 deletions builds/Versions-tvOS.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>SupportedTargetPlatformVersions</key>
Expand Down Expand Up @@ -90,6 +91,7 @@
<string>26.0</string>
<string>26.1</string>
<string>26.2</string>
<string>26.4</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
11 changes: 11 additions & 0 deletions tests/common/TestRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0)
throw new NotImplementedException ($"Missing platform case for Xcode {major}.{minor}");
#endif
case 2:
case 3: // Xcode 26.3 has the same SDK as 26.2, so we treat them the same here
#if __TVOS__
return ChecktvOSSystemVersion (26, 2);
#elif __IOS__
Expand All @@ -479,6 +480,16 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0)
return CheckMacSystemVersion (26, 2);
#else
throw new NotImplementedException ($"Missing platform case for Xcode {major}.{minor}");
#endif
case 4:
#if __TVOS__
return ChecktvOSSystemVersion (26, 4);
#elif __IOS__
return CheckiOSSystemVersion (26, 4);
#elif MONOMAC
return CheckMacSystemVersion (26, 4);
#else
throw new NotImplementedException ($"Missing platform case for Xcode {major}.{minor}");
#endif
default:
throw new NotImplementedException ($"Missing version logic for checking for Xcode {major}.{minor}");
Expand Down
8 changes: 8 additions & 0 deletions tests/dotnet/UnitTests/ProjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3130,6 +3130,8 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/usr/lib/swift/libswiftos.dylib",
"/usr/lib/swift/libswiftOSLog.dylib",
"/usr/lib/swift/libswiftQuartzCore.dylib",
"/usr/lib/swift/libswiftsimd.dylib",
"/usr/lib/swift/libswiftSpatial.dylib",
"/usr/lib/swift/libswiftUIKit.dylib",
"/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib",
"/usr/lib/swift/libswiftXPC.dylib",
Expand Down Expand Up @@ -3257,8 +3259,11 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/usr/lib/swift/libswiftos.dylib",
"/usr/lib/swift/libswiftOSLog.dylib",
"/usr/lib/swift/libswiftQuartzCore.dylib",
"/usr/lib/swift/libswiftsimd.dylib",
"/usr/lib/swift/libswiftSpatial.dylib",
"/usr/lib/swift/libswiftUIKit.dylib",
"/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib",
"/usr/lib/swift/libswiftXPC.dylib",
];

static string [] expectedFrameworks_tvOS_Full = [
Expand Down Expand Up @@ -3441,6 +3446,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/usr/lib/swift/libswiftOSLog.dylib",
"/usr/lib/swift/libswiftQuartzCore.dylib",
"/usr/lib/swift/libswiftsimd.dylib",
"/usr/lib/swift/libswiftSpatial.dylib",
"/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib",
"/usr/lib/swift/libswiftXPC.dylib",
];
Expand Down Expand Up @@ -3633,6 +3639,8 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl
"/usr/lib/swift/libswiftos.dylib",
"/usr/lib/swift/libswiftOSLog.dylib",
"/usr/lib/swift/libswiftQuartzCore.dylib",
"/usr/lib/swift/libswiftsimd.dylib",
"/usr/lib/swift/libswiftSpatial.dylib",
"/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib",
"/usr/lib/swift/libswiftXPC.dylib",
];
Expand Down
5 changes: 2 additions & 3 deletions tests/monotouch-test/CoreGraphics/BitmapContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ public void CreateAdaptive_2 ()
var calledOnLockPointer = false;
var calledOnUnlockPointer = false;
var calledOnReleaseInfo = false;
const int renderingBufferProviderSize = 512;

var calledOnResolve = false;
var calledOnAllocate = false;
var calledOnFree = false;
Expand All @@ -150,10 +148,11 @@ public void CreateAdaptive_2 ()
(ref CGContentInfo info, ref CGBitmapParameters parameters) => {
// TestRuntime.NSLog ($"CreateAdaptive () OnAllocate#2 info={info} parameters={parameters}");
calledOnAllocate = true;
var renderingBufferProviderSize = checked(parameters.AlignedBytesPerRow * parameters.Height);
var renderingBufferProvider = CGRenderingBufferProvider.Create (IntPtr.Zero, renderingBufferProviderSize,
lockPointer: (info) => {
calledOnLockPointer = true;
var rv = Marshal.AllocHGlobal (renderingBufferProviderSize);
var rv = Marshal.AllocHGlobal (checked((nint) renderingBufferProviderSize));
// TestRuntime.NSLog ($"CreateAdaptive3 () OnLockPointer#2 (0x{info:x}) => 0x{rv:x}");
return rv;
},
Expand Down
22 changes: 18 additions & 4 deletions tests/monotouch-test/Security/TrustTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,13 @@ void Trust_FullChain (SecTrust trust, SecPolicy policy, X509CertificateCollectio
trust.SetVerifyDate (new DateTime (2025, 10, 1, 0, 0, 0, DateTimeKind.Utc));

SecTrustResult trust_result = SecTrustResult.Unspecified;
var allow_recoverable_trust_failure = TestRuntime.CheckSystemVersion (TestRuntime.CurrentPlatform, 26, 4);
var result = Evaluate (trust, out var trustError, true);
Assert.That (result, Is.EqualTo (trust_result), $"Evaluate: {trustError}");
if (allow_recoverable_trust_failure) {
Assert.That (result, Is.EqualTo (SecTrustResult.Unspecified).Or.EqualTo (SecTrustResult.RecoverableTrustFailure), $"Evaluate: {trustError}");
} else {
Assert.That (result, Is.EqualTo (trust_result), $"Evaluate: {trustError}");
}

// Evalute must be called prior to Count (Apple documentation)
Assert.That (trust.Count, Is.EqualTo (3), "Count");
Expand All @@ -347,16 +352,25 @@ void Trust_FullChain (SecTrust trust, SecPolicy policy, X509CertificateCollectio
Assert.That (sc3.SubjectSummary, Is.EqualTo ("GTS Root R1"), "SubjectSummary(sc3)");
}

Assert.That (trust.GetTrustResult (), Is.EqualTo (trust_result), "GetTrustResult");
Assert.That (trust.GetTrustResult (), Is.EqualTo (result), "GetTrustResult");

trust.SetAnchorCertificates (certs);
Assert.That (trust.GetCustomAnchorCertificates ().Length, Is.EqualTo (certs.Count), "GetCustomAnchorCertificates");

// since we modified the `trust` instance it's result was invalidated (marked as unspecified on iOS 11)
Assert.That (trust.GetTrustResult (), Is.EqualTo (SecTrustResult.Unspecified), "GetTrustResult-2");

Assert.True (trust.Evaluate (out var error), $"Evaluate: {error}");
Assert.Null (error, "error");
if (result == SecTrustResult.Unspecified) {
Assert.True (trust.Evaluate (out var error), $"Evaluate: {error}");
Assert.Null (error, "error");
} else if (result == SecTrustResult.RecoverableTrustFailure) {
if (trust.Evaluate (out var error))
Assert.Null (error, "error");
else
Assert.NotNull (error, "error");
} else {
Assert.Fail ($"Unexpected trust result: {result}");
}
}

[Test]
Expand Down
53 changes: 37 additions & 16 deletions tests/monotouch-test/System.Net.Http/MessageHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ void SslCertificatesWithoutOCSPEndPointsNSUrlSessionHandler (string url, X509Ver
HttpResponseMessage result = null;
X509Certificate2 serverCertificate = null;
SslPolicyErrors sslPolicyErrors = SslPolicyErrors.None;
Exception ex = null;

var handler = new NSUrlSessionHandler {
ServerCertificateCustomValidationCallback = (request, certificate, chain, errors) => {
Expand All @@ -963,24 +964,44 @@ void SslCertificatesWithoutOCSPEndPointsNSUrlSessionHandler (string url, X509Ver

Assert.IsTrue (handler.CheckCertificateRevocationList, "CheckCertificateRevocationList");

var done = TestRuntime.TryRunAsync (TimeSpan.FromSeconds (30), async () => {
var client = new HttpClient (handler);
// Disable keep-alive and cache to force reconnection for each request
client.DefaultRequestHeaders.ConnectionClose = true;
client.DefaultRequestHeaders.CacheControl = new CacheControlHeaderValue { NoCache = true, NoStore = true };
result = await client.GetAsync (url);
}, out var ex);
for (var i = 0; i < 3; i++) {
callbackWasExecuted = false;
result = null;
serverCertificate = null;
sslPolicyErrors = SslPolicyErrors.None;

if (!done) { // timeouts happen in the bots due to dns issues, connection issues etc., we do not want to fail
Assert.Inconclusive ("Request timedout.");
} else {
Assert.True (callbackWasExecuted, "Validation Callback called");
Assert.AreEqual (expectedError, sslPolicyErrors, "Callback was called with unexpected SslPolicyErrors");
Assert.IsNotNull (serverCertificate, "Server certificate is null");
Assert.IsNull (ex, "Exception wasn't expected.");
Assert.IsNotNull (result, "Result was null");
Assert.IsTrue (result.IsSuccessStatusCode, $"Status code was not success: {result.StatusCode}");
var done = TestRuntime.TryRunAsync (TimeSpan.FromSeconds (30), async () => {
using var client = new HttpClient (handler);
// Disable keep-alive and cache to force reconnection for each request
client.DefaultRequestHeaders.ConnectionClose = true;
client.DefaultRequestHeaders.CacheControl = new CacheControlHeaderValue { NoCache = true, NoStore = true };
result = await client.GetAsync (url);
}, out ex);

if (!done) // timeouts happen in the bots due to dns issues, connection issues etc., we do not want to fail
Assert.Inconclusive ("Request timedout.");

if (callbackWasExecuted)
break;

TestRuntime.IgnoreInCIIfBadNetwork (ex);
if (result is not null)
TestRuntime.IgnoreInCIIfBadNetwork (result.StatusCode);

if (ex is not null)
break;
if (result is null || !result.IsSuccessStatusCode)
break;
}

if (!callbackWasExecuted)
Assert.Inconclusive ("Validation callback was not called.");

Assert.AreEqual (expectedError, sslPolicyErrors, "Callback was called with unexpected SslPolicyErrors");
Assert.IsNotNull (serverCertificate, "Server certificate is null");
Assert.IsNull (ex, "Exception wasn't expected.");
Assert.IsNotNull (result, "Result was null");
Assert.IsTrue (result.IsSuccessStatusCode, $"Status code was not success: {result.StatusCode}");
}
}
}
12 changes: 11 additions & 1 deletion tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ public void DecodeFrameTest ()
Assert.That (url, Is.Not.Null, "Url");

var failures = new List<string> ();
var knownDecoderCallbackStatusCount = 0;
var allowKnownDecoderCallbackStatus = TestRuntime.CheckSystemVersion (ApplePlatform.iOS, 26, 4, throwIfOtherPlatform: false)
|| TestRuntime.CheckSystemVersion (ApplePlatform.TVOS, 26, 4, throwIfOtherPlatform: false);

var bufferEnumerator = new SampleBufferEnumerator (url);

Expand All @@ -179,8 +182,13 @@ public void DecodeFrameTest ()
using var session = CreateSession (bufferEnumerator.FormatDescription,
(sourceFrame, status, flags, buffer, presentationTimeStamp, presentationDuration) => {
frameCallbackCounter++;
if (status != VTStatus.Ok)
if (status != VTStatus.Ok) {
if (allowKnownDecoderCallbackStatus && (int) status == -8969) {
Copy link
Member

Choose a reason for hiding this comment

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

-8969 is codecBadDataErr, so this might warrant a bigger task (separate from this PR) to figure out if we can come up with a test case that works reliably.

Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot please create an issue for this

Copy link
Member Author

Choose a reason for hiding this comment

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

CLI did the trick #24844

knownDecoderCallbackStatusCount++;
return;
}
failures.Add ($"Output callback #{frameCallbackCounter} failed. Expected status = Ok, got status = {status}");
}
if (sourceFrame != sourceFrameValue)
failures.Add ($"Output callback #{frameCallbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrame:x}");
});
Expand All @@ -193,6 +201,8 @@ public void DecodeFrameTest ()
Assert.That (session.FinishDelayedFrames (), Is.EqualTo (VTStatus.Ok), "FinishDelayedFrames");
Assert.That (frameCallbackCounter, Is.GreaterThan (0), "Frame callback counter");
Assert.That (failures, Is.Empty, "Failures");
if (knownDecoderCallbackStatusCount > 0)
Assert.Inconclusive ($"Known decoder callback status -8969 observed {knownDecoderCallbackStatusCount} times.");
}

#if !__TVOS__
Expand Down
1 change: 0 additions & 1 deletion tests/sharpie/Sharpie.Bind.Tests/SdkDbTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ static IEnumerable<TestCaseData> TestCases {
};

var macOSExclude = new string [] {
"AccessorySetupKit", // not available on macOS
"DriverKit", // must be compiled as C++?
"Tk", // depends on X11 headers, which don't exist anymore
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
!missing-field! AVPlayerInterstitialEventMonitorScheduleRequestCompletedNotification not bound
!missing-field! AVPlayerInterstitialEventMonitorScheduleRequestErrorKey not bound
!missing-field! AVPlayerInterstitialEventMonitorScheduleRequestIdentifierKey not bound
!missing-field! AVPlayerInterstitialEventMonitorScheduleRequestResponseKey not bound
!missing-field! AVPlayerRateDidChangeReasonPlayheadReachedLiveEdge not bound
!missing-field! AVPlayerRateDidChangeReasonReversePlaybackReachedStartOfSeekableRange not bound
!missing-selector! +AVCaptionRenderer::captionPreviewForProfileID:extendedLanguageTag:renderSize: not bound
!missing-selector! AVAssetDownloadConfiguration::downloadsInterstitialAssets not bound
!missing-selector! AVAssetDownloadConfiguration::setDownloadsInterstitialAssets: not bound
!missing-selector! AVCaptureDeviceInput::isAudioZoomEnabled not bound
!missing-selector! AVCaptureDeviceInput::isAudioZoomSupported not bound
!missing-selector! AVCaptureDeviceInput::setAudioZoomEnabled: not bound
!missing-selector! AVPlayer::allowsCaptureOfClearKeyVideo not bound
!missing-selector! AVPlayer::setAllowsCaptureOfClearKeyVideo: not bound
!missing-selector! AVPlayerInterstitialEvent::scheduleIdentifier not bound
!missing-selector! AVPlayerItem::interstitialEventIdentifier not bound
!missing-selector! AVPlayerLayer::setCaptionPreviewProfileID:position:text: not bound
!missing-selector! AVPlayerLayer::stopShowingCaptionPreview not bound
11 changes: 11 additions & 0 deletions tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVKit.todo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!missing-enum! AVLegibleMediaOptionsMenuContents not bound
!missing-enum! AVLegibleMediaOptionsMenuStateChangeReason not bound
!missing-protocol! AVLegibleMediaOptionsMenuControllerDelegate not bound
!missing-selector! AVLegibleMediaOptionsMenuController::delegate not bound
!missing-selector! AVLegibleMediaOptionsMenuController::initWithPlayer: not bound
!missing-selector! AVLegibleMediaOptionsMenuController::menuState not bound
!missing-selector! AVLegibleMediaOptionsMenuController::menuWithContents: not bound
!missing-selector! AVLegibleMediaOptionsMenuController::player not bound
!missing-selector! AVLegibleMediaOptionsMenuController::setDelegate: not bound
!missing-selector! AVLegibleMediaOptionsMenuController::setPlayer: not bound
!missing-type! AVLegibleMediaOptionsMenuController not bound
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!missing-enum-value! AXSettingsFeature native value AXSettingsFeatureCaptionStyles = 6 not bound
!missing-field! AXReduceHighlightingEffectsEnabledDidChangeNotification not bound
!missing-pinvoke! AXOpenSettingsFeatureIsSupported is not bound
!missing-pinvoke! AXReduceHighlightingEffectsEnabled is not bound
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!missing-selector! ASAuthorizationSecurityKeyPublicKeyCredentialAssertion::prf not bound
!missing-selector! ASAuthorizationSecurityKeyPublicKeyCredentialRegistration::prf not bound
Loading
Loading