Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xcode13.3] Bring Xcode 13.3 support #14325

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
25d3ba4
[Xcode 13.3] Initial commit to Xcode 13.3 release
dalexsoto Mar 5, 2022
fab5142
[xtro] Fix xtro annotations
dalexsoto Mar 5, 2022
d6445e2
[tests] Fix introspection tests for Xcode 13.3
dalexsoto Mar 5, 2022
c2f75b8
[Accessibility] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
d6c16f3
[AppKit] Update xtro annotations of unbound API
dalexsoto Mar 5, 2022
5cdd265
[AuthenticationServices] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
6e92117
[AVFoundation] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
64008a4
[CarPlay] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
5f26b21
[CellularDataDiagnosticsSuite] Wait to bind this new one until GA
dalexsoto Mar 5, 2022
cbdf3c6
[Contacts] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
785577a
[CoreMediaIO] Add new macOS framework to todo
dalexsoto Mar 5, 2022
3cabb7c
[CoreMotion] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
2864ae2
[FileProvider] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 5, 2022
da193b1
[GameController] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
1659839
[HealthKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
bc88863
[HomeKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
e8d7cc8
[Intents] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
de294bb
[MediaSetup] Add MacCat framework to the todo list
dalexsoto Mar 6, 2022
3d65404
[MetalPerformanceShadersGraph] Add Framework to todo
dalexsoto Mar 6, 2022
e463927
[Network] Add Framework to todo
dalexsoto Mar 6, 2022
a544459
[PassKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
1244854
[Photos] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
c44a90f
[ProximityReader] Ignoring this framework nothing useful to bind
dalexsoto Mar 6, 2022
6400f98
[ReplayKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
c9a1253
[ScreenCaptureKit] Add new Framework to todo
dalexsoto Mar 6, 2022
784e1df
[SensorKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
0ff8e3a
[StoreKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
3ebf2b6
[UIKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
da1e8b7
[VideoToolbox] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
b91411c
[WebKit] Update bindings up to Xcode 13.3 Beta 3
dalexsoto Mar 6, 2022
1a0d1cd
[CI] Force Monterey bot
dalexsoto Mar 7, 2022
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
6 changes: 3 additions & 3 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ MACCATALYST_NUGET_VERSION_NO_METADATA=$(MACCATALYST_NUGET_VERSION)-$(NUGET_PRERE
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=13.2
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_13.2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.2.0.app/Contents/Developer
XCODE_VERSION=13.3
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_13.3_beta_3.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.3.0-beta3.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)

# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
Expand Down
24 changes: 12 additions & 12 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=15.7.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.7.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=15.7.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.7.1.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,11 +66,11 @@ MAC_PACKAGE_VERSION=8.7.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_VERSION=15.2.303
TVOS_NUGET_VERSION=15.2.303
WATCHOS_NUGET_VERSION=8.3.303
MACOS_NUGET_VERSION=12.1.303
MACCATALYST_NUGET_VERSION=15.2.303
IOS_NUGET_VERSION=15.4.100
TVOS_NUGET_VERSION=15.4.100
WATCHOS_NUGET_VERSION=8.5.100
MACOS_NUGET_VERSION=12.3.100
MACCATALYST_NUGET_VERSION=15.4.100


# Defines the default platform version if it's not specified in the TFM. The default should not change for a given .NET version:
Expand All @@ -80,8 +80,8 @@ MACCATALYST_NUGET_VERSION=15.2.303
# Basically: this should be the last OS version of the platform in question when the current major .NET version is first released to stable.
# Ref: https://github.com/dotnet/designs/blob/8e6394406d44f75f30ea2259a425cb9e38d75b69/accepted/2020/net5/net5.md#os-versions

DEFAULT_TARGET_PLATFORM_VERSION_IOS=15.2
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=15.2
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=8.3
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=12.1
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=15.2
DEFAULT_TARGET_PLATFORM_VERSION_IOS=15.4
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=15.4
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=8.5
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=12.3
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=15.4
6 changes: 6 additions & 0 deletions Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
<string>15.4</string>
Copy link
Member

Choose a reason for hiding this comment

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

What happened to 15.3?

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea, what is shipped on Xcode 13.3 is 15.4 I wonder if they are moving to even numbers releases just like us, it seems that there is not 15.1 either heh

</array>
<key>tvOS</key>
<array>
Expand Down Expand Up @@ -78,6 +79,7 @@
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
<string>15.4</string>
</array>
<key>watchOS</key>
<array>
Expand Down Expand Up @@ -105,6 +107,7 @@
<string>7.4</string>
<string>8.0</string>
<string>8.3</string>
<string>8.5</string>
</array>
<key>MacCatalyst</key>
<array>
Expand All @@ -119,6 +122,7 @@
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
<string>15.4</string>
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand All @@ -145,6 +149,8 @@
<string>12.0</string>
<key>15.2</key>
<string>12.1</string>
<key>15.4</key>
<string>12.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 @@ -24,6 +24,7 @@
<string>11.3</string>
<string>12.0</string>
<string>12.1</string>
<string>12.3</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion runtime/trampolines-invoke.m
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@

// invoke
MonoObject *retval;
MonoObject *ctorval;
MonoObject *ctorval __attribute__((unused));
if (is_ctor) {
/*
* Some Objective-C classes overwrite retain, release,
Expand Down
55 changes: 55 additions & 0 deletions src/GameController/GCMotion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

using System;
using System.Runtime.Versioning;
using System.Runtime.InteropServices;

using ObjCRuntime;
using Foundation;
Expand Down Expand Up @@ -58,4 +59,58 @@ public struct GCQuaternion {
public double Z;
public double W;
}

#if NET
[SupportedOSPlatform ("ios15.4")]
[SupportedOSPlatform ("macos12.3")]
[SupportedOSPlatform ("tvos15.4")]
#else
[Introduced (PlatformName.iOS, 15, 4)]
[Introduced (PlatformName.MacOSX, 12, 3)]
[Introduced (PlatformName.TvOS, 15, 4)]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct GCDualSenseAdaptiveTriggerPositionalAmplitudes {

const int DiscretePositionCount = 10; // From GCDualSenseAdaptiveTrigger.h
[MarshalAs (UnmanagedType.ByValArray, SizeConst = DiscretePositionCount)]
public float [] Values;

public GCDualSenseAdaptiveTriggerPositionalAmplitudes (float [] values)
{
if (values is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (values));
if (values.Length > DiscretePositionCount)
throw new ArgumentException ($"The '{nameof (values)}' array length can't be greater than {DiscretePositionCount}.");
Copy link
Member

Choose a reason for hiding this comment

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


Values = values;
}
}

#if NET
[SupportedOSPlatform ("ios15.4")]
[SupportedOSPlatform ("macos12.3")]
[SupportedOSPlatform ("tvos15.4")]
#else
[Introduced (PlatformName.iOS, 15, 4)]
[Introduced (PlatformName.MacOSX, 12, 3)]
[Introduced (PlatformName.TvOS, 15, 4)]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct GCDualSenseAdaptiveTriggerPositionalResistiveStrengths {

const int DiscretePositionCount = 10; // From GCDualSenseAdaptiveTrigger.h
[MarshalAs (UnmanagedType.ByValArray, SizeConst = DiscretePositionCount)]
public float [] Values;

public GCDualSenseAdaptiveTriggerPositionalResistiveStrengths (float [] values)
{
if (values is null)
ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (values));
if (values.Length > DiscretePositionCount)
throw new ArgumentException ($"The '{nameof (values)}' array length can't be greater than {DiscretePositionCount}.");
Copy link
Member

Choose a reason for hiding this comment

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

Can it be less that DiscretePositionCount?

Copy link
Member

Choose a reason for hiding this comment

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


Values = values;
}
}
}
4 changes: 4 additions & 0 deletions src/accessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,15 @@ interface AXBrailleMap : NSCopying, NSSecureCoding {
[Protocol]
interface AXBrailleMapRenderer {

#if !NET
[Abstract]
#endif
[Export ("accessibilityBrailleMapRenderRegion", ArgumentSemantic.Assign)]
CGRect AccessibilityBrailleMapRenderRegion { get; set; }

#if !NET
[Abstract]
#endif
[Export ("accessibilityBrailleMapRenderer", ArgumentSemantic.Copy)]
Action<AXBrailleMap> AccessibilityBrailleMapRenderer { get; set; }
}
Expand Down
9 changes: 9 additions & 0 deletions src/authenticationservices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@ interface ASAuthorizationProviderExtensionAuthorizationRequest {
[Mac (11,0)]
[Export ("localizedCallerDisplayName")]
string LocalizedCallerDisplayName { get; }

[Mac (12,3), iOS (15,4), MacCatalyst (15,4)]
[Export ("userInterfaceEnabled")]
bool UserInterfaceEnabled { [Bind ("isUserInterfaceEnabled")] get; }
}

[Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)]
Expand Down Expand Up @@ -818,6 +822,11 @@ interface ASWebAuthenticationSessionWebBrowserSessionManager {

[Export ("wasLaunchedByAuthenticationServices")]
bool WasLaunchedByAuthenticationServices { get; }

[Mac (12,3)]
[Static]
[Export ("registerDefaultsForASWASInSetupAssistantIfNeeded")]
void RegisterDefaultsForAswasInSetupAssistantIfNeeded ();
}


Expand Down
82 changes: 74 additions & 8 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7181,6 +7181,30 @@ enum AVMetadataObjectType : ulong {
[NoTV][NoWatch]
[Field ("AVMetadataObjectTypeSalientObject")]
SalientObject = 1 << 17,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeCodabarCode")]
CodabarCode = 1 << 18,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeGS1DataBarCode")]
GS1DataBarCode = 1 << 19,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeGS1DataBarExpandedCode")]
GS1DataBarExpandedCode = 1 << 20,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeGS1DataBarLimitedCode")]
GS1DataBarLimitedCode = 1 << 21,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeMicroQRCode")]
MicroQRCode = 1 << 22,

[TV (15,4), NoWatch, MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Field ("AVMetadataObjectTypeMicroPDF417Code")]
MicroPdf417Code = 1 << 23,
}

[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -8976,6 +9000,14 @@ interface AVCaptureSession {
[Field ("AVCaptureSessionInterruptionSystemPressureStateKey")]
NSString InterruptionSystemPressureStateKey { get; }

[NullAllowed]
[MacCatalyst (15,4), Mac (12,3), iOS (15,4)]
[Export ("synchronizationClock")]
CMClock SynchronizationClock { get; }

[Deprecated (PlatformName.MacOSX, 12, 3, message: "Use 'SynchronizationClock' instead.")]
[Deprecated (PlatformName.iOS, 15, 4, message: "Use 'SynchronizationClock' instead.")]
[Deprecated (PlatformName.MacCatalyst, 15, 4, message: "Use 'SynchronizationClock' instead.")]
[iOS (7,0)]
[Export ("masterClock"), NullAllowed]
CMClock MasterClock { get; }
Expand Down Expand Up @@ -10606,6 +10638,10 @@ enum AVCaptureDeviceType {
[NoWatch, NoTV, NoiOS, NoMacCatalyst]
[Field ("AVCaptureDeviceTypeExternalUnknown")]
ExternalUnknown,

[NoWatch, NoTV, NoMac, MacCatalyst (15,4), iOS (15,4)]
[Field ("AVCaptureDeviceTypeBuiltInLiDARDepthCamera")]
BuiltInLiDarDepthCamera,
}

[NoTV, iOS (7,0), Mac (10,14), NoWatch] // matches API that uses it.
Expand Down Expand Up @@ -10753,6 +10789,16 @@ interface AVCaptureDevice {
[Export ("exposurePointOfInterest")]
CGPoint ExposurePointOfInterest { get; set; }

[NoWatch]
[NoTV, NoMac, MacCatalyst (15,4), iOS (15,4)]
Comment on lines +10792 to +10793
Copy link
Member

Choose a reason for hiding this comment

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

Why is NoWatch in the same line (curious more than anything).

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to follow along the style in the file, see methods above

[Export ("automaticallyAdjustsFaceDrivenAutoExposureEnabled")]
bool AutomaticallyAdjustsFaceDrivenAutoExposureEnabled { get; set; }

[NoWatch]
[NoTV, NoMac, MacCatalyst (15,4), iOS (15,4)]
[Export ("faceDrivenAutoExposureEnabled")]
bool FaceDrivenAutoExposureEnabled { [Bind ("isFaceDrivenAutoExposureEnabled")] get; set; }

[NoWatch]
[Export ("adjustingExposure")]
bool AdjustingExposure { [Bind ("isAdjustingExposure")] get; }
Expand Down Expand Up @@ -10866,6 +10912,14 @@ interface AVCaptureDevice {
[Export ("smoothAutoFocusEnabled")]
bool SmoothAutoFocusEnabled { [Bind ("isSmoothAutoFocusEnabled")] get; set; }

[NoWatch, NoTV, NoMac, MacCatalyst (15,4), iOS (15,4)]
[Export ("automaticallyAdjustsFaceDrivenAutoFocusEnabled")]
bool AutomaticallyAdjustsFaceDrivenAutoFocusEnabled { get; set; }

[NoWatch, NoTV, NoMac, MacCatalyst (15,4), iOS (15,4)]
[Export ("faceDrivenAutoFocusEnabled")]
bool FaceDrivenAutoFocusEnabled { [Bind ("isFaceDrivenAutoFocusEnabled")] get; set; }

// Either AVMediaTypeVideo or AVMediaTypeAudio.
[iOS (7,0), NoWatch]
[Static]
Expand Down Expand Up @@ -11226,23 +11280,26 @@ interface AVCaptureDevice {

// from AVCaptureDevice_AVCaptureDeviceCenterStage

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Static]
[Export ("centerStageControlMode", ArgumentSemantic.Assign)]
AVCaptureCenterStageControlMode CenterStageControlMode { get; set; }

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Static]
[Export ("centerStageEnabled")]
bool CenterStageEnabled { [Bind ("isCenterStageEnabled")] get; set; }

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Export ("centerStageActive")]
bool CenterStageActive { [Bind ("isCenterStageActive")] get; }

Expand Down Expand Up @@ -11433,27 +11490,31 @@ interface AVCaptureDeviceFormat {

// from AVCaptureDeviceFormat_AVCaptureDeviceFormatCenterStage

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Export ("centerStageSupported")]
bool CenterStageSupported { [Bind ("isCenterStageSupported")] get; }

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Export ("videoMinZoomFactorForCenterStage")]
nfloat VideoMinZoomFactorForCenterStage { get; }

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Export ("videoMaxZoomFactorForCenterStage")]
nfloat VideoMaxZoomFactorForCenterStage { get; }

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Export ("videoFrameRateRangeForCenterStage")]
[NullAllowed]
AVFrameRateRange VideoFrameRateRangeForCenterStage { get; }
Expand Down Expand Up @@ -14982,9 +15043,10 @@ interface AVAudioRoutingArbiter
void LeaveArbitration ();
}

[NoWatch, NoTV, NoMac]
[NoWatch, NoTV]
[iOS (14,5)]
[MacCatalyst (14,5)]
[Mac (12,3)]
[Native]
public enum AVCaptureCenterStageControlMode : long {
User = 0,
Expand Down Expand Up @@ -15325,6 +15387,10 @@ interface AVPlayerPlaybackCoordinatorDelegate
{
[Export ("playbackCoordinator:identifierForPlayerItem:")]
string GetIdentifier (AVPlayerPlaybackCoordinator coordinator, AVPlayerItem playerItem);

[TV (15,4), NoWatch, Mac (12,3), iOS (15,4), MacCatalyst (15,4)]
[Export ("playbackCoordinator:interstitialTimeRangesForPlayerItem:")]
NSValue [] GetInterstitialTimeRanges (AVPlayerPlaybackCoordinator coordinator, AVPlayerItem playerItem);
}

[TV (15,0), NoWatch, Mac (12,0), iOS (15,0), MacCatalyst (15,0)]
Expand Down
Loading