Skip to content

Commit

Permalink
[xcode13.2] Bump to Xcode 13.2 RC and apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexsoto committed Dec 8, 2021
1 parent 617a0d1 commit 849cf7a
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ MACCATALYST_NUGET_VERSION_FULL=$(MACCATALYST_NUGET_VERSION_NO_METADATA)+$(NUGET_

# 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_beta_2.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.2.0-beta2.app/Contents/Developer
XCODE_URL=https://dl.internalx.com/internal-files/xcodes/Xcode_13.2_Release_Candidate.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_13.2.0-rc.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
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=15.3.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.3.1.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=15.4.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=8.4.0.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,11 +66,11 @@ MAC_PACKAGE_VERSION=8.3.1.$(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.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
IOS_NUGET_VERSION=15.2.100
TVOS_NUGET_VERSION=15.2.100
WATCHOS_NUGET_VERSION=8.3.100
MACOS_NUGET_VERSION=12.1.100
MACCATALYST_NUGET_VERSION=15.2.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 Down
14 changes: 8 additions & 6 deletions src/AppKit/Compat.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !__MACCATALYST__
#if !NET
using System;
using System.ComponentModel;

Expand All @@ -7,7 +7,7 @@

namespace AppKit {
partial class NSMutableParagraphStyle {
#if !XAMCORE_4_0

[Obsolete ("Use the 'TextBlocks' property instead.", false)]
[EditorBrowsable (EditorBrowsableState.Never)]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
Expand Down Expand Up @@ -39,16 +39,18 @@ public virtual void SetTextLists (NSTextList[] array)
}
nsa_array.Dispose ();
}
#endif
}

#if !XAMCORE_4_0
public static class NSFileTypeForHFSTypeCode
{
public static readonly string ComputerIcon = "root";
public static readonly string DesktopIcon = "desk";
public static readonly string FinderIcon = "FNDR";
}
#endif

public partial class NSApplication {
public static NSString ProtectedDataWillBecomeUnavailableNotification => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public static NSString ProtectedDataDidBecomeAvailableNotification => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
}
}
#endif // !__MACCATALYST__
#endif // !NET
7 changes: 4 additions & 3 deletions src/CallKit/CXCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public class CXProvider : NSObject {
public CXProvider (CXProviderConfiguration configuration) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);

public virtual CXCallAction[] GetPendingCallActions (Class callActionClass, NSUuid callUuid) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public virtual CXCallAction[] GetPendingCallActions<T> (NSUuid callUuid) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public virtual void Invalidate () => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public virtual void ReportCall (NSUuid uuid, CXCallUpdate update) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public virtual void ReportCall (NSUuid uuid, NSDate? dateEnded, CXCallEndedReason endedReason) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
Expand Down Expand Up @@ -168,6 +169,7 @@ public class CXAnswerCallAction : CXCallAction {
protected CXAnswerCallAction (NSObjectFlag t) : base (t) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
protected internal CXAnswerCallAction (IntPtr handle) : base (handle) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXAnswerCallAction (NSUuid callUuid) : base (callUuid) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXAnswerCallAction (NSCoder coder) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);

public virtual void Fulfill (NSDate dateConnected) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
} /* class CXAnswerCallAction */
Expand Down Expand Up @@ -195,6 +197,7 @@ public class CXCallAction : CXAction {
protected internal CXCallAction (IntPtr handle) : base (handle) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
protected internal CXCallAction () => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXCallAction (NSUuid callUuid) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXCallAction (NSCoder coder) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);

public virtual NSUuid CallUuid => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
} /* class CXCallAction */
Expand All @@ -206,10 +209,8 @@ public class CXCallUpdate : NSObject, INSCopying {
protected CXCallUpdate (NSObjectFlag t) : base (t) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
protected internal CXCallUpdate (IntPtr handle) : base (handle) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXCallUpdate (NSUuid callUuid) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public CXCallUpdate () => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);

[Export ("copyWithZone:")]
[return: ReleaseAttribute ()]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual NSObject Copy (NSZone? zone) => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
public virtual bool HasVideo {
get => throw new PlatformNotSupportedException (Constants.UnavailableOnMacOS);
Expand Down
4 changes: 4 additions & 0 deletions src/HomeKit/HMCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class HMChipServiceRequestHandler : NSObject, INSExtensionRequestHandling

public HMChipServiceRequestHandler () => throw new InvalidOperationException ();
protected HMChipServiceRequestHandler (NSObjectFlag t) => throw new InvalidOperationException ();
protected HMChipServiceRequestHandler (IntPtr handle) => 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 ();
Expand All @@ -47,6 +48,7 @@ public class HMChipServiceTopology : NSObject, INSCoding, INSCopying, INSSecureC

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

protected HMChipServiceTopology (IntPtr handle) => throw new InvalidOperationException ();
public HMChipServiceTopology (NSCoder coder) => throw new InvalidOperationException ();
protected HMChipServiceTopology (NSObjectFlag t) => throw new InvalidOperationException ();
public HMChipServiceTopology (HMChipServiceHome[] homes) => throw new InvalidOperationException ();
Expand All @@ -63,6 +65,7 @@ public class HMChipServiceRoom : NSObject, INSCoding, INSCopying, INSSecureCodin

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

protected HMChipServiceRoom (IntPtr handle) => 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 ();
Expand All @@ -80,6 +83,7 @@ public partial class HMChipServiceHome : NSObject, INSCoding, INSCopying, INSSec

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

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

Expand Down
2 changes: 0 additions & 2 deletions src/intents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1806,8 +1806,6 @@ public enum INMediaUserContextSubscriptionStatus : long {
Unknown = 0,
NotSubscribed,
Subscribed,
[Watch (8,3), TV (15,2), iOS (15,2), MacCatalyst (15,2)]
Voice,
}

[Watch (6,0), TV (14,0), NoMac, iOS (13,0)]
Expand Down
2 changes: 1 addition & 1 deletion src/usernotifications.cs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ interface UNNotificationSound : NSCopying, NSSecureCoding {
[NoWatch, NoTV, NoMacCatalyst, NoMac, iOS (15,2)]
[Static]
[Export ("ringtoneSoundNamed:")]
UNNotificationSound GetRingtoneSoundNamed (string name);
UNNotificationSound GetRingtoneSound (string name);

[NoWatch, iOS (12,0)]
[Static]
Expand Down
12 changes: 12 additions & 0 deletions tests/common/TestRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ public static bool CheckXcodeVersion (int major, int minor, int build = 0)
return CheckMacSystemVersion (12, 0);
#else
throw new NotImplementedException ();
#endif
case 2:
#if __WATCHOS__
return CheckWatchOSSystemVersion (8, 3);
#elif __TVOS__
return ChecktvOSSystemVersion (15, 2);
#elif __IOS__
return CheckiOSSystemVersion (15, 2);
#elif MONOMAC
return CheckMacSystemVersion (12, 1);
#else
throw new NotImplementedException ();
#endif
default:
throw new NotImplementedException ();
Expand Down
10 changes: 8 additions & 2 deletions tests/monotouch-test/EventKit/CalendarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ public void FromEventStore ()
Assert.That (c.Title, Is.EqualTo (string.Empty), "Title");
#else
Assert.That (c.SupportedEventAvailabilities, Is.EqualTo (EKCalendarEventAvailability.None), "SupportedEventAvailabilities");
Assert.Null (c.Title, "Title");
if (TestRuntime.CheckXcodeVersion (13, 2))
Assert.That (c.Title, Is.EqualTo (string.Empty), "Title");
else
Assert.Null (c.Title, "Title");
#endif
Assert.That (c.Type, Is.EqualTo (EKCalendarType.Local), "Type");
}
Expand Down Expand Up @@ -121,7 +124,10 @@ public void FromEventStoreWithReminder ()
Assert.That (c.Title, Is.EqualTo (string.Empty), "Title");
#else
Assert.That (c.SupportedEventAvailabilities, Is.EqualTo (EKCalendarEventAvailability.None), "SupportedEventAvailabilities");
Assert.Null (c.Title, "Title");
if (TestRuntime.CheckXcodeVersion (13, 2))
Assert.That (c.Title, Is.EqualTo (string.Empty), "Title");
else
Assert.Null (c.Title, "Title");
#endif
Assert.That (c.Type, Is.EqualTo (EKCalendarType.Local), "Type");
Assert.AreEqual (EKEntityMask.Reminder, c.AllowedEntityTypes, "AllowedEntityTypes");
Expand Down
10 changes: 8 additions & 2 deletions tests/monotouch-test/UIKit/TextFieldTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public void EmptySelection ()
}
if (TestRuntime.CheckXcodeVersion (13, 0)) {
#if !__TVOS__
Assert.That (tf.TypingAttributes, Is.Empty, "default 13.0");
if (TestRuntime.CheckXcodeVersion (13, 2))
Assert.That (tf.TypingAttributes, Is.Not.Empty, "default 13.2");
else
Assert.That (tf.TypingAttributes, Is.Empty, "default 13.0");
#else
Assert.That (tf.TypingAttributes, Is.Not.Empty, "default 13.0");
#endif
Expand All @@ -63,7 +66,10 @@ public void EmptySelection ()
tf.TypingAttributes = new NSDictionary ();
if (TestRuntime.CheckXcodeVersion (13, 0)) {
#if !__TVOS__
Assert.That (tf.TypingAttributes, Is.Empty, "empty 13.0");
if (TestRuntime.CheckXcodeVersion (13, 2))
Assert.That (tf.TypingAttributes, Is.Not.Empty, "empty 13.2");
else
Assert.That (tf.TypingAttributes, Is.Empty, "empty 13.0");
#else
Assert.That (tf.TypingAttributes, Is.Not.Empty, "empty 13.0");
#endif
Expand Down

0 comments on commit 849cf7a

Please sign in to comment.