From 1c8c4fb6d06cb1caaf0fccb6c05508b331d900a4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 7 Sep 2023 07:37:35 +0200 Subject: [PATCH] [tools] Skip more types and namespaces when using Xcode 15. (#18938) Backport of #18936. --- tools/common/Frameworks.cs | 5 +++++ tools/common/StaticRegistrar.cs | 2 +- tools/common/Target.cs | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index 2a486de3d003..ca5cab5cec4d 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -778,6 +778,11 @@ static void Gather (Application app, AssemblyDefinition product_assembly, HashSe static bool FilterFrameworks (Application app, Framework framework) { + if (framework.Name == "NewsstandKit" && Driver.XcodeVersion.Major >= 15) { + Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 15+.", framework.Name); + return false; + } + switch (app.Platform) { #if !NET // CHIP has been removed in Xcode 14 Beta 5 in favor of Matter diff --git a/tools/common/StaticRegistrar.cs b/tools/common/StaticRegistrar.cs index c84ad581d07e..c947c6bfd651 100644 --- a/tools/common/StaticRegistrar.cs +++ b/tools/common/StaticRegistrar.cs @@ -2908,7 +2908,7 @@ void Specialize (AutoIndentStringBuilder sb, out string initialization_method) continue; } - if (@class.Type.Is ("PassKit", "PKDisbursementAuthorizationControllerDelegate")) { + if (@class.Type.Is ("PassKit", "PKDisbursementAuthorizationControllerDelegate") || @class.Type.Is ("PassKit", "IPKDisbursementAuthorizationControllerDelegate")) { exceptions.Add (ErrorHelper.CreateWarning (4189, $"The class '{@class.Type.FullName}' will not be registered it has been removed from the {App.Platform} SDK.")); continue; } diff --git a/tools/common/Target.cs b/tools/common/Target.cs index c952d93fed1f..9a29cff60e6c 100644 --- a/tools/common/Target.cs +++ b/tools/common/Target.cs @@ -277,6 +277,12 @@ public void GatherFrameworks () continue; } break; + case "NewsstandKit": + if (Driver.XcodeVersion.Major >= 15) { + Driver.Log (3, "Not linking with the framework {0} because it's not available when using Xcode 15+.", framework.Name); + continue; + } + break; default: if (App.IsSimulatorBuild && !App.IsFrameworkAvailableInSimulator (framework.Name)) { if (App.AreAnyAssembliesTrimmed) {