diff --git a/src/Controls/src/Core/Platform/iOS/CustomPressGestureRecognizer.cs b/src/Controls/src/Core/Platform/iOS/CustomPressGestureRecognizer.cs index 5758a89e0e9a..ebf9229b19a5 100644 --- a/src/Controls/src/Core/Platform/iOS/CustomPressGestureRecognizer.cs +++ b/src/Controls/src/Core/Platform/iOS/CustomPressGestureRecognizer.cs @@ -4,7 +4,6 @@ using ObjCRuntime; using UIKit; using Microsoft.Maui.Controls; -using PreserveAttribute = Microsoft.Maui.Controls.Internals.PreserveAttribute; namespace Microsoft.Maui.Controls.Platform.iOS; @@ -33,7 +32,7 @@ public CustomPressGestureRecognizer(Action action) /// public UIEvent CurrentEvent => _currentEvent; - [Register("__UIGestureRecognizer")] + [Register("Microsoft_Maui_Controls_Platform_iOS_CustomPressGestureRecognizer_Callback")] class Callback : Token { Action action; @@ -44,7 +43,6 @@ internal Callback(Action action) } [Export("target:")] - [Preserve(Conditional = true)] public void Activated(UIGestureRecognizer sender) { if (OperatingSystem.IsIOSVersionAtLeast(13)) diff --git a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs index 50ec5e3c3033..dd3826703566 100644 --- a/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs +++ b/src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/BuildWarningsUtilities.cs @@ -200,7 +200,9 @@ public static void AssertWarnings(this List actualWarnings, Lis Code = "IL3050", Messages = new List { - "Microsoft.Android.Runtime.ManagedTypeManager.g__MakeGenericType|4_1(Type,Type[]): Using member 'System.Type.MakeGenericType(Type[])' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. The native code for this instantiation might not be available at runtime.", + "Microsoft.Android.Runtime.AndroidReflectionJniValueManager.AndroidReflectionJniValueManager(): Using member 'Java.Interop.JniRuntime.ReflectionJniValueManager.ReflectionJniValueManager()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. This JniValueManager implementation is not compatible with Native AOT. Use a different JniValueManager implementation that supports Native AOT.", + "Microsoft.Android.Runtime.ManagedTypeManager.ManagedTypeManager(): Using member 'Java.Interop.JniRuntime.ReflectionJniTypeManager.ReflectionJniTypeManager()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. This JniTypeManager implementation is not compatible with Native AOT. Use a different JniTypeManager implementation that supports Native AOT.", + "Microsoft.Android.Runtime.ManagedTypeManager.g__MakeGenericType|5_1(Type,Type[]): Using member 'System.Type.MakeGenericType(Type[])' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. The native code for this instantiation might not be available at runtime.", "Android.Runtime.JNIEnv.MakeArrayType(Type): Using member 'System.Type.MakeArrayType()' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. The code for an array of the specified type might not be available.", "Android.Runtime.JNINativeWrapper.CreateDelegate(Delegate): Using member 'System.Reflection.Emit.DynamicMethod.DynamicMethod(String,Type,Type[],Type,Boolean)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. Creating a DynamicMethod requires dynamic code.", "Java.Interop.JavaConvert.g__MakeGenericType|2_0(Type,Type[]): Using member 'System.Type.MakeGenericType(Type[])' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling. The native code for this instantiation might not be available at runtime.",