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

[net9.0] Revert: Add MauiUIApplicationDelegate remote notification methods #24907

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions src/Controls/samples/Controls.Sample/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ public static MauiApp CreateMauiApp()
.PerformActionForShortcutItem((a, b, c) => LogEvent(nameof(iOSLifecycle.PerformActionForShortcutItem)))
.WillEnterForeground((a) => LogEvent(nameof(iOSLifecycle.WillEnterForeground)))
.ApplicationSignificantTimeChange((a) => LogEvent(nameof(iOSLifecycle.ApplicationSignificantTimeChange)))
.WillTerminate((a) => LogEvent(nameof(iOSLifecycle.WillTerminate)))
.RegisteredForRemoteNotifications((a, b) => LogEvent(nameof(iOSLifecycle.RegisteredForRemoteNotifications)))
.ReceivedRemoteNotification((a,b) => LogEvent(nameof(iOSLifecycle.ReceivedRemoteNotification))));
.WillTerminate((a) => LogEvent(nameof(iOSLifecycle.WillTerminate))));
#elif WINDOWS
// Log everything in this one
events.AddWindows(windows => windows
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public static class iOSLifecycle
public delegate void WillTerminate(UIApplication application);
public delegate void ApplicationSignificantTimeChange(UIApplication application);
public delegate void PerformFetch(UIApplication application, Action<UIBackgroundFetchResult> completionHandler);
public delegate void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken);
public delegate void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo);

// Scene
public delegate void SceneWillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ public static class iOSLifecycleBuilderExtensions
public static IiOSLifecycleBuilder WillEnterForeground(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.WillEnterForeground del) => lifecycle.OnEvent(del);
public static IiOSLifecycleBuilder WillTerminate(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.WillTerminate del) => lifecycle.OnEvent(del);
public static IiOSLifecycleBuilder ApplicationSignificantTimeChange(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.ApplicationSignificantTimeChange del) => lifecycle.OnEvent(del);
public static IiOSLifecycleBuilder RegisteredForRemoteNotifications(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.RegisteredForRemoteNotifications del) => lifecycle.OnEvent(del);
public static IiOSLifecycleBuilder ReceivedRemoteNotification(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.ReceivedRemoteNotification del) => lifecycle.OnEvent(del);


[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
public static IiOSLifecycleBuilder SceneWillConnect(this IiOSLifecycleBuilder lifecycle, iOSLifecycle.SceneWillConnect del) => lifecycle.OnEvent(del);
Expand Down
12 changes: 0 additions & 12 deletions src/Core/src/Platform/iOS/MauiUIApplicationDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,6 @@ public virtual void PerformFetch(UIApplication application, Action<UIBackgroundF
_services?.InvokeLifecycleEvents<iOSLifecycle.PerformFetch>(del => del(application, completionHandler));
}

[Export("application:didRegisterForRemoteNotificationsWithDeviceToken:")]
public virtual void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
_services?.InvokeLifecycleEvents<iOSLifecycle.RegisteredForRemoteNotifications>(del => del(application, deviceToken));
}

[Export("application:didReceiveRemoteNotification:")]
public virtual void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
{
_services?.InvokeLifecycleEvents<iOSLifecycle.ReceivedRemoteNotification>(del => del(application, userInfo));
}

[UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "There can only be one MauiUIApplicationDelegate.")]
public static MauiUIApplicationDelegate Current { get; private set; } = null!;

Expand Down
6 changes: 0 additions & 6 deletions src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Microsoft.Maui.ITitleBar.Title.get -> string?
Microsoft.Maui.IWebView.ProcessTerminated(Microsoft.Maui.WebProcessTerminatedEventArgs! args) -> void
*REMOVED*Microsoft.Maui.IWindow.Content.get -> Microsoft.Maui.IView!
Microsoft.Maui.IWindow.Content.get -> Microsoft.Maui.IView?
Microsoft.Maui.LifecycleEvents.iOSLifecycle.ReceivedRemoteNotification
Microsoft.Maui.LifecycleEvents.iOSLifecycle.RegisteredForRemoteNotifications
Microsoft.Maui.Platform.MauiHybridWebView
Microsoft.Maui.Platform.MauiHybridWebView.MauiHybridWebView(Microsoft.Maui.Handlers.HybridWebViewHandler! handler, CoreGraphics.CGRect frame, WebKit.WKWebViewConfiguration! configuration) -> void
Microsoft.Maui.Platform.MauiHybridWebView.SendRawMessage(string! rawMessage) -> void
Expand All @@ -56,14 +54,10 @@ static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.
static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.Keyboard.Password.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.LifecycleEvents.iOSLifecycleBuilderExtensions.ReceivedRemoteNotification(this Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder! lifecycle, Microsoft.Maui.LifecycleEvents.iOSLifecycle.ReceivedRemoteNotification! del) -> Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder!
static Microsoft.Maui.LifecycleEvents.iOSLifecycleBuilderExtensions.RegisteredForRemoteNotifications(this Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder! lifecycle, Microsoft.Maui.LifecycleEvents.iOSLifecycle.RegisteredForRemoteNotifications! del) -> Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder!
*REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController!
static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController!
static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow?
static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow?
static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void
virtual Microsoft.Maui.MauiUIApplicationDelegate.ReceivedRemoteNotification(UIKit.UIApplication! application, Foundation.NSDictionary! userInfo) -> void
virtual Microsoft.Maui.MauiUIApplicationDelegate.RegisteredForRemoteNotifications(UIKit.UIApplication! application, Foundation.NSData! deviceToken) -> void
override Microsoft.Maui.Platform.MauiCALayer.AddAnimation(CoreAnimation.CAAnimation! animation, string? key) -> void
*REMOVED*override Microsoft.Maui.Handlers.BorderHandler.ConnectHandler(Microsoft.Maui.Platform.ContentView! platformView) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Microsoft.Maui.ITitleBar.Title.get -> string?
Microsoft.Maui.IWebView.ProcessTerminated(Microsoft.Maui.WebProcessTerminatedEventArgs! args) -> void
*REMOVED*Microsoft.Maui.IWindow.Content.get -> Microsoft.Maui.IView!
Microsoft.Maui.IWindow.Content.get -> Microsoft.Maui.IView?
Microsoft.Maui.LifecycleEvents.iOSLifecycle.ReceivedRemoteNotification
Microsoft.Maui.LifecycleEvents.iOSLifecycle.RegisteredForRemoteNotifications
Microsoft.Maui.Platform.MauiHybridWebView
Microsoft.Maui.Platform.MauiHybridWebView.MauiHybridWebView(Microsoft.Maui.Handlers.HybridWebViewHandler! handler, CoreGraphics.CGRect frame, WebKit.WKWebViewConfiguration! configuration) -> void
Microsoft.Maui.Platform.MauiHybridWebView.SendRawMessage(string! rawMessage) -> void
Expand All @@ -56,14 +54,10 @@ static Microsoft.Maui.Handlers.HybridWebViewHandler.MapSendRawMessage(Microsoft.
static Microsoft.Maui.Keyboard.Date.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.Keyboard.Password.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.Keyboard.Time.get -> Microsoft.Maui.Keyboard!
static Microsoft.Maui.LifecycleEvents.iOSLifecycleBuilderExtensions.ReceivedRemoteNotification(this Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder! lifecycle, Microsoft.Maui.LifecycleEvents.iOSLifecycle.ReceivedRemoteNotification! del) -> Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder!
static Microsoft.Maui.LifecycleEvents.iOSLifecycleBuilderExtensions.RegisteredForRemoteNotifications(this Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder! lifecycle, Microsoft.Maui.LifecycleEvents.iOSLifecycle.RegisteredForRemoteNotifications! del) -> Microsoft.Maui.LifecycleEvents.IiOSLifecycleBuilder!
*REMOVED*static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement! view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController!
static Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(this Microsoft.Maui.IElement? view, Microsoft.Maui.IMauiContext! context) -> UIKit.UIViewController!
static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindow? platformWindow) -> Microsoft.Maui.IWindow?
static Microsoft.Maui.Platform.UIWindowExtensions.GetWindow(this UIKit.UIWindowScene? windowScene) -> Microsoft.Maui.IWindow?
static Microsoft.Maui.ViewExtensions.DisconnectHandlers(this Microsoft.Maui.IView! view) -> void
virtual Microsoft.Maui.MauiUIApplicationDelegate.ReceivedRemoteNotification(UIKit.UIApplication! application, Foundation.NSDictionary! userInfo) -> void
virtual Microsoft.Maui.MauiUIApplicationDelegate.RegisteredForRemoteNotifications(UIKit.UIApplication! application, Foundation.NSData! deviceToken) -> void
override Microsoft.Maui.Platform.MauiCALayer.AddAnimation(CoreAnimation.CAAnimation! animation, string? key) -> void
*REMOVED*override Microsoft.Maui.Handlers.BorderHandler.ConnectHandler(Microsoft.Maui.Platform.ContentView! platformView) -> void
Loading