Skip to content

Commit 0452b6f

Browse files
[xcode26.0] Update to Xcode 26 Release Candidate (#23779)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
1 parent 17a6cf2 commit 0452b6f

File tree

19 files changed

+946
-2275
lines changed

19 files changed

+946
-2275
lines changed

Make.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)$(NUGET_B
202202

203203
# Xcode version should have both a major and a minor version (even if the minor version is 0)
204204
XCODE_VERSION=26.0
205-
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_26_beta_7.xip
206-
XCODE_DEVELOPER_ROOT=/Applications/Xcode_26.0.0-beta7.app/Contents/Developer
205+
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_26_Release_Candidate.xip
206+
XCODE_DEVELOPER_ROOT=/Applications/Xcode_26.0.0-rc.app/Contents/Developer
207207
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)
208208

209209
# We define stable Xcode as the Xcode app being named like "Xcode_#.#[.#].app"

src/AVFoundation/AVTypes.cs

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#endif // !COREBUILD
77
using CoreGraphics;
88
using ObjCRuntime;
9+
using CoreMedia;
910

1011
#nullable enable
1112

@@ -880,4 +881,174 @@ public static AVCaptionSize Create (AVCaptionDimension width, AVCaptionDimension
880881
=> AVCaptionSizeMake (width, height);
881882
}
882883
#endif // __TVOS__
884+
885+
/// <summary>Represents a timecode structure adhering to SMPTE standards for precise time information and synchronization.</summary>
886+
/// <remarks>This structure corresponds to the SMPTE 12M-1 Linear Timecode (LTC) format.</remarks>
887+
[SupportedOSPlatform ("ios26.0")]
888+
[SupportedOSPlatform ("maccatalyst26.0")]
889+
[SupportedOSPlatform ("macos26.0")]
890+
[SupportedOSPlatform ("tvos26.0")]
891+
[StructLayout (LayoutKind.Sequential)]
892+
public struct AVCaptureTimecode
893+
#if !COREBUILD
894+
: IEquatable<AVCaptureTimecode>
895+
#endif
896+
{
897+
/* uint8_t */
898+
byte hours;
899+
/* uint8_t */
900+
byte minutes;
901+
/* uint8_t */
902+
byte seconds;
903+
/* uint8_t */
904+
byte frames;
905+
/* uint32_t */
906+
uint userBits;
907+
CMTime frameDuration;
908+
nuint sourceType;
909+
910+
/// <summary>Gets or sets the hour component of the timecode.</summary>
911+
/// <value>The hour value of the current timecode.</value>
912+
public byte Hours {
913+
get => hours;
914+
set => hours = value;
915+
}
916+
917+
/// <summary>Gets or sets the minute component of the timecode.</summary>
918+
/// <value>The minute value of the current timecode.</value>
919+
public byte Minutes {
920+
get => minutes;
921+
set => minutes = value;
922+
}
923+
924+
/// <summary>Gets or sets the second component of the timecode.</summary>
925+
/// <value>The second value of the current timecode.</value>
926+
public byte Seconds {
927+
get => seconds;
928+
set => seconds = value;
929+
}
930+
931+
/// <summary>Gets or sets the frame component of the timecode.</summary>
932+
/// <value>The frame count within the current second.</value>
933+
public byte Frames {
934+
get => frames;
935+
set => frames = value;
936+
}
937+
938+
/// <summary>Gets or sets the SMPTE user bits field.</summary>
939+
/// <value>A field carrying additional metadata such as scene-take information, reel numbers, or dates.</value>
940+
/// <remarks>The exact usage of user bits is application-dependent and not strictly standardized by SMPTE.</remarks>
941+
public uint UserBits {
942+
get => userBits;
943+
set => userBits = value;
944+
}
945+
946+
/// <summary>Gets or sets the frame duration of the timecode.</summary>
947+
/// <value>The duration of each frame. If unknown, the value is <see cref="CMTime.Invalid" />.</value>
948+
public CMTime FrameDuration {
949+
get => frameDuration;
950+
set => frameDuration = value;
951+
}
952+
953+
#if !COREBUILD
954+
/// <summary>Gets or sets the source type of the timecode.</summary>
955+
/// <value>The type indicating the emitter, carriage, or transport mechanism of the timecode.</value>
956+
public AVCaptureTimecodeSourceType SourceType {
957+
get => (AVCaptureTimecodeSourceType) (long) sourceType;
958+
set => sourceType = (nuint) (long) value;
959+
}
960+
961+
/// <summary>Initializes a new instance of the AVCaptureTimecode structure.</summary>
962+
/// <param name="hours">The hour component of the timecode.</param>
963+
/// <param name="minutes">The minute component of the timecode.</param>
964+
/// <param name="seconds">The second component of the timecode.</param>
965+
/// <param name="frames">The frame component of the timecode.</param>
966+
/// <param name="userBits">The SMPTE user bits for additional metadata.</param>
967+
/// <param name="frameDuration">The duration of each frame.</param>
968+
/// <param name="sourceType">The source type of the timecode.</param>
969+
public AVCaptureTimecode (byte hours, byte minutes, byte seconds, byte frames, uint userBits, CMTime frameDuration, AVCaptureTimecodeSourceType sourceType)
970+
{
971+
Hours = hours;
972+
Minutes = minutes;
973+
Seconds = seconds;
974+
Frames = frames;
975+
UserBits = userBits;
976+
FrameDuration = frameDuration;
977+
SourceType = sourceType;
978+
}
979+
980+
// CMSampleBufferRef _Nullable AVCaptureTimecodeCreateMetadataSampleBufferAssociatedWithPresentationTimeStamp(AVCaptureTimecode timecode, CMTime presentationTimeStamp)
981+
[DllImport (Constants.AVFoundationLibrary)]
982+
static extern IntPtr /* CMSampleBufferRef */ AVCaptureTimecodeCreateMetadataSampleBufferAssociatedWithPresentationTimeStamp (AVCaptureTimecode timecode, CMTime presentationTimeStamp);
983+
984+
/// <summary>Creates a sample buffer containing timecode metadata associated with a presentation timestamp.</summary>
985+
/// <param name="presentationTimeStamp">The presentation time stamp that determines when the metadata should be applied in the media timeline.</param>
986+
/// <returns>A sample buffer with encoded timecode metadata for video synchronization, or <see langword="null" /> if creation fails.</returns>
987+
/// <remarks>This method creates a <see cref="CMSampleBuffer" /> with metadata for integration with a video track at a specific moment in time.</remarks>
988+
public CMSampleBuffer? CreateMetadataSampleBufferAssociatedWithPresentationTimeStamp (CMTime presentationTimeStamp)
989+
{
990+
var ptr = AVCaptureTimecodeCreateMetadataSampleBufferAssociatedWithPresentationTimeStamp (this, presentationTimeStamp);
991+
return CMSampleBuffer.Create (ptr, owns: true);
992+
}
993+
994+
// CMSampleBufferRef _Nullable AVCaptureTimecodeCreateMetadataSampleBufferForDuration(AVCaptureTimecode timecode, CMTime duration)
995+
[DllImport (Constants.AVFoundationLibrary)]
996+
static extern IntPtr /* CMSampleBufferRef */ AVCaptureTimecodeCreateMetadataSampleBufferForDuration (AVCaptureTimecode timecode, CMTime duration);
997+
998+
/// <summary>Creates a sample buffer containing timecode metadata for a specified duration.</summary>
999+
/// <param name="duration">The duration that the metadata sample buffer should represent.</param>
1000+
/// <returns>A sample buffer with encoded timecode metadata for the given duration, or <see langword="null" /> if creation fails.</returns>
1001+
/// <remarks>Use this method for scenarios where timecode metadata needs to span a custom interval rather than a single frame.</remarks>
1002+
public CMSampleBuffer? CreateMetadataSampleBufferForDuration (CMTime duration)
1003+
{
1004+
var ptr = AVCaptureTimecodeCreateMetadataSampleBufferForDuration (this, duration);
1005+
return CMSampleBuffer.Create (ptr, owns: true);
1006+
}
1007+
1008+
// AVCaptureTimecode AVCaptureTimecodeAdvancedByFrames(AVCaptureTimecode timecode, int64_t framesToAdd)
1009+
[DllImport (Constants.AVFoundationLibrary)]
1010+
static extern AVCaptureTimecode AVCaptureTimecodeAdvancedByFrames (AVCaptureTimecode timecode, long framesToAdd);
1011+
1012+
/// <summary>Generates a new timecode by adding a specified number of frames to this timecode.</summary>
1013+
/// <param name="framesToAdd">The number of frames to add to the timecode.</param>
1014+
/// <returns>A new timecode with the updated time values after adding the specified frames.</returns>
1015+
/// <remarks>This method handles overflow for seconds, minutes, and hours appropriately.</remarks>
1016+
public AVCaptureTimecode AddFrames (long framesToAdd) => AVCaptureTimecodeAdvancedByFrames (this, framesToAdd);
1017+
1018+
/// <summary>Determines whether two timecode instances are equal.</summary>
1019+
/// <param name="left">The first timecode to compare.</param>
1020+
/// <param name="right">The second timecode to compare.</param>
1021+
/// <returns>True if the timecodes are equal; otherwise, false.</returns>
1022+
public static bool operator == (AVCaptureTimecode left, AVCaptureTimecode right) => left.Equals (right);
1023+
1024+
/// <summary>Determines whether two timecode instances are not equal.</summary>
1025+
/// <param name="left">The first timecode to compare.</param>
1026+
/// <param name="right">The second timecode to compare.</param>
1027+
/// <returns>True if the timecodes are not equal; otherwise, false.</returns>
1028+
public static bool operator != (AVCaptureTimecode left, AVCaptureTimecode right) => !left.Equals (right);
1029+
1030+
/// <summary>Determines whether this timecode is equal to the specified object.</summary>
1031+
/// <param name="obj">The object to compare with this timecode.</param>
1032+
/// <returns>True if the specified object is equal to this timecode; otherwise, false.</returns>
1033+
public override bool Equals (object? obj) => obj is AVCaptureTimecode other && Equals (other);
1034+
1035+
/// <summary>Determines whether this timecode is equal to another timecode.</summary>
1036+
/// <param name="other">The other timecode to compare with this timecode.</param>
1037+
/// <returns>True if the timecodes are equal; otherwise, false.</returns>
1038+
public bool Equals (AVCaptureTimecode other)
1039+
{
1040+
return Hours == other.Hours
1041+
&& Minutes == other.Minutes
1042+
&& Seconds == other.Seconds
1043+
&& Frames == other.Frames
1044+
&& UserBits == other.UserBits
1045+
&& FrameDuration.Equals (other.FrameDuration)
1046+
&& SourceType == other.SourceType;
1047+
}
1048+
1049+
/// <summary>Returns the hash code for this timecode.</summary>
1050+
/// <returns>A hash code for the current timecode.</returns>
1051+
public override int GetHashCode () => HashCode.Combine (Hours, Minutes, Seconds, Frames, UserBits, FrameDuration, SourceType);
1052+
#endif
1053+
}
8831054
}

src/AVFoundation/Enums.cs

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ public enum AVError : long {
380380
MediaExtensionConflict = -11887,
381381
ContentKeyRequestPlaybackDestinationDoesNotSupportDeviceIdentifierRandomization = -11888,
382382
ContentKeyInvalid = -11889,
383+
NoSmartFramingsEnabled = -11890,
384+
AutoWhiteBalanceNotLocked = -11891,
385+
FollowExternalSyncDeviceTimedOut = -11892,
383386
}
384387

385388
/// <summary>An enumeration whose values specify the behavior of the player when it finishes playing.</summary>
@@ -965,6 +968,8 @@ public enum AVCaptureVideoStabilizationMode : long {
965968
PreviewOptimized = 4,
966969
[iOS (18, 0), MacCatalyst (18, 0), TV (18, 0), NoMac]
967970
CinematicExtendedEnhanced = 5,
971+
[iOS (26, 0), NoMacCatalyst, NoTV, NoMac]
972+
LowLatency = 6,
968973
/// <summary>The device determines the stabilization mode.</summary>
969974
Auto = -1,
970975
}
@@ -1144,6 +1149,8 @@ public enum AVCaptureColorSpace : long {
11441149
HlgBT2020 = 2,
11451150
[NoMac, NoiOS, NoMacCatalyst]
11461151
AppleLog = 3,
1152+
[NoMac, iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
1153+
AppleLog2 = 4,
11471154
}
11481155

11491156
/// <summary>Enumerates loop count limits.</summary>
@@ -1663,6 +1670,14 @@ public enum AVVideoCodecType {
16631670
[TV (18, 0), MacCatalyst (18, 0), Mac (15, 0), iOS (18, 0)]
16641671
[Field ("AVVideoCodecTypeJPEGXL")]
16651672
JpegXl = 11,
1673+
1674+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
1675+
[Field ("AVVideoCodecTypeAppleProResRAW")]
1676+
AppleProResRaw = 12,
1677+
1678+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
1679+
[Field ("AVVideoCodecTypeAppleProResRAWHQ")]
1680+
AppleProResRawHQ = 13,
16661681
}
16671682

16681683
[Introduced (PlatformName.MacCatalyst, 14, 0)]
@@ -2307,4 +2322,72 @@ public enum AVAudioDynamicRangeControlConfiguration : long {
23072322
Movie = 3,
23082323
Capture = 4,
23092324
}
2325+
2326+
[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
2327+
public enum AVCaptureAspectRatio {
2328+
[Field ("AVCaptureAspectRatio1x1")]
2329+
OneByOne1x1,
2330+
2331+
[Field ("AVCaptureAspectRatio16x9")]
2332+
SixteenByNine16x9,
2333+
2334+
[Field ("AVCaptureAspectRatio9x16")]
2335+
NineBySixteen9x16,
2336+
2337+
[Field ("AVCaptureAspectRatio4x3")]
2338+
FourByThree4x3,
2339+
2340+
[Field ("AVCaptureAspectRatio3x4")]
2341+
ThreeByFour3x4,
2342+
}
2343+
2344+
[TV (26, 0), NoMac, MacCatalyst (26, 0), iOS (26, 0)]
2345+
[BackingFieldType (typeof (AVCaptureWhiteBalanceTemperatureAndTintValues))]
2346+
public enum AVCaptureWhiteBalanceTemperatureAndTintValue {
2347+
[Field ("AVCaptureWhiteBalanceTemperatureAndTintValuesTungsten")]
2348+
Tungsten,
2349+
2350+
[Field ("AVCaptureWhiteBalanceTemperatureAndTintValuesFluorescent")]
2351+
Fluorescent,
2352+
2353+
[Field ("AVCaptureWhiteBalanceTemperatureAndTintValuesDaylight")]
2354+
Daylight,
2355+
2356+
[Field ("AVCaptureWhiteBalanceTemperatureAndTintValuesCloudy")]
2357+
Cloudy,
2358+
2359+
[Field ("AVCaptureWhiteBalanceTemperatureAndTintValuesShadow")]
2360+
Shadow,
2361+
}
2362+
2363+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
2364+
[Native]
2365+
public enum AVExternalSyncDeviceStatus : long {
2366+
Unavailable = 0,
2367+
Ready = 1,
2368+
Calibrating = 2,
2369+
ActiveSync = 3,
2370+
FreeRunSync = 4,
2371+
}
2372+
2373+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
2374+
[Native]
2375+
public enum AVCaptureTimecodeSourceType : long {
2376+
FrameCount = 0,
2377+
RealTimeClock = 1,
2378+
External = 2,
2379+
}
2380+
2381+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
2382+
[Native]
2383+
public enum AVCaptureTimecodeGeneratorSynchronizationStatus : long {
2384+
Unknown = 0,
2385+
SourceSelected = 1,
2386+
Synchronizing = 2,
2387+
Synchronized = 3,
2388+
TimedOut = 4,
2389+
SourceUnavailable = 5,
2390+
SourceUnsupported = 6,
2391+
NotRequired = 7,
2392+
}
23102393
}

src/Metal/MTLEnums.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,8 @@ public enum MTLDataType : ulong {
12871287
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
12881288
BFloat4 = 124,
12891289
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
1290+
DepthStencilState = 139,
1291+
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
12901292
Tensor = 140,
12911293
}
12921294

@@ -2016,6 +2018,8 @@ public enum MTLGpuFamily : long {
20162018
Apple8 = 1008,
20172019
[NoTV]
20182020
Apple9 = 1009,
2021+
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
2022+
Apple10 = 1010,
20192023
Mac1 = 2001,
20202024
Mac2 = 2002,
20212025
Common1 = 3001,
@@ -2616,4 +2620,12 @@ public enum MTLVisibilityResultType : long {
26162620
Reset = 0,
26172621
Accumulate = 1,
26182622
}
2623+
2624+
[Mac (26, 0), iOS (26, 0), MacCatalyst (26, 0), TV (26, 0)]
2625+
[Native]
2626+
public enum MTLSamplerReductionMode : ulong {
2627+
WeightedAverage = 0,
2628+
Minimum = 1,
2629+
Maximum = 2,
2630+
}
26192631
}

src/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@
544544
</data>
545545

546546
<data name="BI1088" xml:space="preserve">
547-
<value>The backing field type '{0}' is invalid. Valid backing field types are: "NSString", "NSNumber", "nint" and "nuint".</value>
547+
<value>The backing field type '{0}' is invalid. Valid backing field types are: "NSString", "NSNumber", and blittable value types.</value>
548548
</data>
549549

550550
<data name="BI1101" xml:space="preserve">

src/VideoToolbox/VTDefs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public enum VTStatus {
9999
CouldNotOutputTaggedBufferGroupErr = -17699,
100100
CouldNotFindExtensionErr = -19510,
101101
ExtensionConflictErr = -19511,
102+
VideoEncoderAutoWhiteBalanceNotLockedErr = -19512,
102103
}
103104

104105
// uint32_t -> VTErrors.h

0 commit comments

Comments
 (0)