IApplicationLifecycle

Receives application-wide startup, scene foreground and background, and shutdown notifications.

Startup completes before UIKit creates the first window. Foreground, background, and shutdown notifications originate in UIKit callbacks and therefore cannot delay the operating system. Shutdown is best-effort because iOS can terminate a suspended application without notifying it.

public interface IApplicationLifecycle

Methods

EnterBackgroundAsync

Runs when an application scene enters the background.

Task EnterBackgroundAsync()

Returns

EnterForegroundAsync

Runs when an application scene returns to the foreground.

Task EnterForegroundAsync()

Returns

StartAsync

Runs once after SkeleApplication.Current is assigned and before UIKit starts.

Keep startup short. UIKit objects are not available until this method completes.

Task StartAsync()

Returns

StopAsync

Runs at most once when UIKit reports that the application is stopping.

Task StopAsync()

Returns