Table of Contents

Class IosAvaloniaAppDelegate<TUi>

Namespace
VpnHood.AppHosting.Avalonia.Ios
Assembly
VpnHood.AppHosting.Avalonia.Ios.dll

Represents the Avalonia UI's application delegate on iOS: a head's app delegate derives from it, says how its app starts (CreateInitParams()), and carries only what the system reads, its [Register] name.

public abstract class IosAvaloniaAppDelegate<TUi> : AvaloniaAppDelegate<TUi>, IEquatable<NSObject>, INSObjectProtocol, IUIActivityItemsConfigurationProviding, IUIPasteConfigurationSupporting, IUIResponderStandardEditActions, IUIUserActivityRestoring, IUIApplicationDelegate, INativeObject, IDisposable, IAvaloniaAppDelegate where TUi : Application, IAvaloniaUi, new()

Type Parameters

TUi

The UI's application.

Inheritance
NSObject
UIResponder
AvaloniaAppDelegate<TUi>
IosAvaloniaAppDelegate<TUi>
Implements
IEquatable<NSObject>
INSObjectProtocol
IUIActivityItemsConfigurationProviding
IUIPasteConfigurationSupporting
IUIResponderStandardEditActions
IUIUserActivityRestoring
IUIApplicationDelegate
INativeObject
IAvaloniaAppDelegate

Remarks

The app starts when Avalonia asks for the app builder; the UI then gets the app's API in process, and its content from the UI content the app's options name, in the shipped heads a zip in the app bundle.

Constructors

IosAvaloniaAppDelegate()

Initializes a new instance of the IosAvaloniaAppDelegate<TUi> class.

protected IosAvaloniaAppDelegate()

Remarks

Where the UI is a VpnHoodAvaloniaAppBase, the first file the app is opened with, or a link other than http or https, goes to it to import as an access key.

Methods

CreateAppBuilder()

protected override AppBuilder CreateAppBuilder()

Returns

AppBuilder

Remarks

It starts the app, then the UI over the app's API in process, and sets the UI context.

Exceptions

InvalidOperationException

The init params name no storage folder, or an App Group without a container; the platform has no local app data folder; the resolved storage folder has no parent; or the app's options name no UI content.

CreateInitParams()

Creates the head's init params: the app's, and the two iOS facts the platform builds its device from.

protected abstract IosInitParams CreateInitParams()

Returns

IosInitParams

The init params.

GetSupportedInterfaceOrientations(UIApplication, UIWindow?)

Gets the orientations the app allows a window, in place of the Info.plist's: portrait only on an iPhone, as the UI's wide layout is for an iPad, and all on an iPad.

[Export("application:supportedInterfaceOrientationsForWindow:")]
public UIInterfaceOrientationMask GetSupportedInterfaceOrientations(UIApplication application, UIWindow? forWindow)

Parameters

application UIApplication

The app.

forWindow UIWindow

The window, or null.

Returns

UIInterfaceOrientationMask

The orientations.