Skip to content

Commit

Permalink
[Xcode13.2] Bump to Xcode 13.2 Beta 2
Browse files Browse the repository at this point in the history
Breaking changes addressed for legacy
* HomeKit
* CallKit
* CoreLocation
  • Loading branch information
dalexsoto committed Dec 6, 2021
1 parent 8ec686c commit 617a0d1
Show file tree
Hide file tree
Showing 58 changed files with 3,214 additions and 329 deletions.
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.1
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_13.1_Release_Candidate.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.1.0-rc.app/Contents/Developer
XCODE_VERSION=13.2
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_13.2_beta_2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.2.0-beta2.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.3.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.3.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=15.3.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.3.1.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,11 +66,11 @@ MAC_PACKAGE_VERSION=8.3.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.0.101
TVOS_NUGET_VERSION=15.0.101
WATCHOS_NUGET_VERSION=8.0.101
MACOS_NUGET_VERSION=12.0.101
MACCATALYST_NUGET_VERSION=15.0.101
IOS_NUGET_VERSION=15.2.101
TVOS_NUGET_VERSION=15.2.101
WATCHOS_NUGET_VERSION=8.3.101
MACOS_NUGET_VERSION=12.1.101
MACCATALYST_NUGET_VERSION=15.2.101


# 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.0.101
# 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.0
DEFAULT_TARGET_PLATFORM_VERSION_TVOS=15.0
DEFAULT_TARGET_PLATFORM_VERSION_WATCHOS=8.0
DEFAULT_TARGET_PLATFORM_VERSION_MACOS=12.0
DEFAULT_TARGET_PLATFORM_VERSION_MACCATALYST=15.0
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
6 changes: 6 additions & 0 deletions Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<string>14.4</string>
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
</array>
<key>tvOS</key>
<array>
Expand Down Expand Up @@ -76,6 +77,7 @@
<string>14.4</string>
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
</array>
<key>watchOS</key>
<array>
Expand All @@ -102,6 +104,7 @@
<string>7.3</string>
<string>7.4</string>
<string>8.0</string>
<string>8.3</string>
</array>
<key>MacCatalyst</key>
<array>
Expand All @@ -115,6 +118,7 @@
<string>14.4</string>
<string>14.5</string>
<string>15.0</string>
<string>15.2</string>
</array>
</dict>
<key>MacCatalystVersionMap</key>
Expand All @@ -139,6 +143,8 @@
<string>11.3</string>
<key>15.0</key>
<string>12.0</string>
<key>15.2</key>
<string>12.1</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 @@ -23,6 +23,7 @@
<string>11.2</string>
<string>11.3</string>
<string>12.0</string>
<string>12.1</string>
</array>
</dict>
<key>RecommendedXcodeVersion</key>
Expand Down
4 changes: 4 additions & 0 deletions src/AVFoundation/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,10 @@ public enum AVOutputSettingsPreset {
[TV (13,0), NoWatch, Mac (10,15), iOS (13,0)]
[Field ("AVOutputSettingsPresetHEVC3840x2160WithAlpha")]
PresetHevc3840x2160WithAlpha = 14,

[NoTV, NoWatch, Mac (12,1), NoiOS]
[Field ("AVOutputSettingsPresetHEVC7680x4320")]
PresetHevc7680x4320 = 15,
}

[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down
445 changes: 445 additions & 0 deletions src/CallKit/CXCompat.cs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/CallKit/CXProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Copyright 2016 Xamarin Inc. All rights reserved.
//

#if !MONOMAC
using System;
using Foundation;
using ObjCRuntime;
Expand All @@ -20,3 +21,4 @@ public CXCallAction [] GetPendingCallActions<T> (NSUuid callUuid)
}
}
}
#endif // !MONOMAC
39 changes: 36 additions & 3 deletions src/CoreLocation/CLCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
using System.Runtime.InteropServices;

using ObjCRuntime;
using Foundation;

namespace CoreLocation {

#if !XAMCORE_4_0 && !WATCH
#nullable enable
#if !NET && !WATCH

#if !TVOS
public partial class CLHeading {
Expand All @@ -16,7 +18,7 @@ public partial class CLHeading {
return base.Description;
}
}
#endif
#endif // !TVOS

public partial class CLLocation {

Expand All @@ -26,5 +28,36 @@ public partial class CLLocation {
return base.Description;
}
}
#endif
#endif // !NET && !WATCH

#if !NET && (WATCH || TVOS || MONOMAC)

// Symbol in Xcode 13.2 from watchOS and tvOS

[Obsolete (Constants.UnavailableOnThisPlatform)]
[Native]
public enum CLLocationPushServiceError : long {
Unknown = 0,
MissingPushExtension = 1,
MissingPushServerEnvironment = 2,
MissingEntitlement = 3,
}

[Obsolete (Constants.UnavailableOnThisPlatform)]
public static class CLLocationPushServiceErrorExtensions {
public static NSString? GetDomain (this CLLocationPushServiceError self) => throw new PlatformNotSupportedException (Constants.UnavailableOnThisPlatform);
}

[Obsolete (Constants.UnavailableOnThisPlatform)]
public interface ICLLocationPushServiceExtension : INativeObject, IDisposable
{
void DidReceiveLocationPushPayload (NSDictionary<NSString, NSObject> payload, Action completion);
}

[Obsolete (Constants.UnavailableOnThisPlatform)]
public static partial class CLLocationPushServiceExtension_Extensions {
public static void ServiceExtensionWillTerminate (this ICLLocationPushServiceExtension This) => throw new PlatformNotSupportedException (Constants.UnavailableOnThisPlatform);
}

#endif // !NET && (WATCH || TVOS)
}
103 changes: 103 additions & 0 deletions src/HomeKit/HMCompat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
//
// HMCompat.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//

using System;
using System.Threading.Tasks;
using Foundation;
using CoreFoundation;

#if !NET
#nullable enable
namespace HomeKit {

[Obsolete ("Use 'HMFetchRoomHandler' instead.")]
public delegate void FetchRoomHandler (NSArray<HMChipServiceRoom> rooms, NSError error);

[Obsolete ("Use 'Action<Error>' instead.")]
public delegate void HMErrorHandler (NSError error);

[Obsolete ("This class is removed, use 'HMMatterRequestHandler' instead.")]
[Register ("HMCHIPServiceRequestHandler", SkipRegistration = true)]
public class HMChipServiceRequestHandler : NSObject, INSExtensionRequestHandling {

public override IntPtr ClassHandle => throw new InvalidOperationException ();

public HMChipServiceRequestHandler () => throw new InvalidOperationException ();
protected HMChipServiceRequestHandler (NSObjectFlag t) => throw new InvalidOperationException ();

public virtual void BeginRequestWithExtensionContext (NSExtensionContext context) => throw new InvalidOperationException ();
public virtual void ConfigureAccessory (string accessoryName, HMChipServiceRoom accessoryRoom, Action<NSError> completion) => throw new InvalidOperationException ();
public virtual Task ConfigureAccessoryAsync (string accessoryName, HMChipServiceRoom accessoryRoom) => throw new InvalidOperationException ();
public virtual void FetchRooms (HMChipServiceHome home, FetchRoomHandler completion) => throw new InvalidOperationException ();
public virtual Task<NSArray<HMChipServiceRoom>> FetchRoomsAsync (HMChipServiceHome home) => throw new InvalidOperationException ();
public virtual void PairAccessory (HMChipServiceHome home, string onboardingPayload, Action<NSError> completion) => throw new InvalidOperationException ();
public virtual Task PairAccessoryAsync (HMChipServiceHome home, string onboardingPayload) => throw new InvalidOperationException ();

} /* class HMChipServiceRequestHandler */

[Obsolete ("This class is removed, use 'HMMatterTopology' instead.")]
[Register ("HMCHIPServiceTopology", SkipRegistration = true)]
public class HMChipServiceTopology : NSObject, INSCoding, INSCopying, INSSecureCoding {

public override IntPtr ClassHandle => throw new InvalidOperationException ();

public HMChipServiceTopology (NSCoder coder) => throw new InvalidOperationException ();
protected HMChipServiceTopology (NSObjectFlag t) => throw new InvalidOperationException ();
public HMChipServiceTopology (HMChipServiceHome[] homes) => throw new InvalidOperationException ();

public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException ();
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException ();
public virtual HMChipServiceHome[] Homes => throw new InvalidOperationException ();

} /* class HMChipServiceTopology */

[Obsolete ("This class is removed, use 'HMMatterRoom' instead.")]
[Register("HMCHIPServiceRoom", SkipRegistration = true)]
public class HMChipServiceRoom : NSObject, INSCoding, INSCopying, INSSecureCoding {

public override IntPtr ClassHandle => throw new InvalidOperationException ();

public HMChipServiceRoom (NSCoder coder) => throw new InvalidOperationException ();
protected HMChipServiceRoom (NSObjectFlag t) => throw new InvalidOperationException ();
public HMChipServiceRoom (NSUuid uuid, string name) => throw new InvalidOperationException ();

public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException ();
public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException ();
public virtual string Name => throw new InvalidOperationException ();
public virtual NSUuid Uuid => throw new InvalidOperationException ();

} /* class HMChipServiceRoom */

[Obsolete ("This class is removed, use 'HMMatterHome' instead.")]
[Register("HMCHIPServiceHome", SkipRegistration = true)]
public partial class HMChipServiceHome : NSObject, INSCoding, INSCopying, INSSecureCoding {

public override IntPtr ClassHandle => throw new InvalidOperationException ();

public HMChipServiceHome (NSCoder coder) => throw new InvalidOperationException ();
protected HMChipServiceHome (NSObjectFlag t) => throw new InvalidOperationException ();

public HMChipServiceHome (NSUuid uuid, string name) => throw new InvalidOperationException ();
public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException ();

public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException ();
public virtual string Name => throw new InvalidOperationException ();
public virtual NSUuid Uuid => throw new InvalidOperationException ();

} /* class HMChipServiceHome */

public partial class HMAccessorySetupManager {

public virtual void AddAndSetUpAccessories (HMChipServiceTopology topology, HMErrorHandler completion) => throw new InvalidOperationException ();
public virtual Task AddAndSetUpAccessoriesAsync (HMChipServiceTopology topology) => throw new InvalidOperationException ();

} /* class HMAccessorySetupManager */

}
#endif // !NET
4 changes: 4 additions & 0 deletions src/ObjCRuntime/ObsoleteConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ partial class Constants {

internal const string iAdRemoved = "The iAd framework has been removed from iOS.";

internal const string UnavailableOnMacOS = "This type is not available on macOS.";

internal const string UnavailableOnThisPlatform = "This type is not available on this Platform.";

}
}
31 changes: 31 additions & 0 deletions src/accessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,35 @@ interface AXNumericDataAxisDescriptor : AXDataAxisDescriptor
[DesignatedInitializer]
NativeHandle Constructor (NSAttributedString attributedTitle, double lowerBound, double upperBound, [NullAllowed] NSNumber[] gridlinePositions, Func<double, NSString> valueDescriptionProvider);
}

[Watch (8,3), TV (15,2), Mac (12,1), iOS (15,2), MacCatalyst (15,2)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface AXBrailleMap : NSCopying, NSSecureCoding {

[Export ("dimensions")]
CGSize Dimensions { get; }

[Export ("setHeight:atPoint:")]
void SetHeight (float status, CGPoint point);

[Export ("heightAtPoint:")]
float GetHeight (CGPoint point);

[Export ("presentImage:")]
void Present (CGImage image);
}

[Watch (8,3), TV (15,2), Mac (12,1), iOS (15,2), MacCatalyst (15,2)]
[Protocol]
interface AXBrailleMapRenderer {

[Abstract]
[Export ("accessibilityBrailleMapRenderRegion", ArgumentSemantic.Assign)]
CGRect AccessibilityBrailleMapRenderRegion { get; set; }

[Abstract]
[Export ("accessibilityBrailleMapRenderer", ArgumentSemantic.Copy)]
Action<AXBrailleMap> AccessibilityBrailleMapRenderer { get; set; }
}
}
4 changes: 4 additions & 0 deletions src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8236,6 +8236,10 @@ interface AVAssetExportSession {
[Field ("AVAssetExportPresetHEVC3840x2160WithAlpha")]
NSString PresetHevc3840x2160WithAlpha { get; }

[NoWatch, NoTV, NoiOS, Mac (12,1)]
[Field ("AVAssetExportPresetHEVC7680x4320")]
NSString PresetHevc7680x4320 { get; }

[TV (13,0), NoWatch, Mac (10,15), iOS (13,0)]
[Field ("AVAssetExportPresetHEVCHighestQualityWithAlpha")]
NSString PresetHevcHighestQualityWithAlpha { get; }
Expand Down
Loading

0 comments on commit 617a0d1

Please sign in to comment.