Skip to content

Commit

Permalink
Add delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
jfversluis committed Mar 2, 2023
1 parent 030f091 commit f0de054
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Core/src/LifecycleEvents/iOS/iOSLifecycle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Foundation;
using System;
using Foundation;
using ObjCRuntime;
using UIKit;

Expand All @@ -17,6 +18,7 @@ public static class iOSLifecycle
public delegate void WillEnterForeground(UIApplication application);
public delegate void WillTerminate(UIApplication application);
public delegate void ApplicationSignificantTimeChange(UIApplication application);
public delegate void PerformFetch(UIApplication application, Action<UIBackgroundFetchResult> completionHandler);

// Scene
public delegate void SceneWillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/MauiUIApplicationDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public virtual void ApplicationSignificantTimeChange(UIApplication application)
[Export("application:performFetchWithCompletionHandler:")]
public virtual void PerformFetch(UIApplication application, Action<UIBackgroundFetchResult> completionHandler)
{
Services?.InvokeLifecycleEvents<iOSLifecycle.PerformFetch>(del => del(application));
Services?.InvokeLifecycleEvents<iOSLifecycle.PerformFetch>(del => del(application, completionHandler));
}

public static MauiUIApplicationDelegate Current { get; private set; } = null!;
Expand Down
1 change: 1 addition & 0 deletions src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Microsoft.Maui.Handlers.SwipeItemButton.FrameChanged -> System.EventHandler?
Microsoft.Maui.Handlers.SwipeItemButton.SwipeItemButton() -> void
Microsoft.Maui.Hosting.MauiApp.DisposeAsync() -> System.Threading.Tasks.ValueTask
Microsoft.Maui.Layouts.FlexBasis.Equals(Microsoft.Maui.Layouts.FlexBasis other) -> bool
Microsoft.Maui.LifecycleEvents.iOSLifecycle.PerformFetch
Microsoft.Maui.SizeRequest.Equals(Microsoft.Maui.SizeRequest other) -> bool
override Microsoft.Maui.Handlers.SwipeItemButton.Frame.get -> CoreGraphics.CGRect
override Microsoft.Maui.Handlers.SwipeItemButton.Frame.set -> void
Expand Down

0 comments on commit f0de054

Please sign in to comment.