| 123456789101112131415161718192021222324252627282930313233343536 |
- using Avalonia;
- using Avalonia.iOS;
- using Foundation;
- using InABox.Avalonia.Platform;
- using InABox.Avalonia.Platform.iOS; //using InABox.Avalonia.Platform;
- //using InABox.Avalonia.Platform.iOS;
- using ObjCRuntime;
- namespace PRS.Avalonia.iOS;
- // The UIApplicationDelegate for the application. This class is responsible for launching the
- // User Interface of the application, as well as listening (and optionally responding) to
- // application events from iOS.
- [Register("AppDelegate")]
- #pragma warning disable CA1711 // Identifiers should not have incorrect suffix
- public partial class AppDelegate : AvaloniaAppDelegate<App>
- #pragma warning restore CA1711 // Identifiers should not have incorrect suffix
- {
- protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
- {
-
- PlatformTools.Register<IDeviceId, iOS_DeviceId>();
- PlatformTools.Register<IAppVersion,iOS_AppVersion>();
- PlatformTools.Register<IImageTools, iOS_ImageTools>();
- PlatformTools.Register<IPdfRenderer, iOS_PdfRenderer>();
- var result = base.CustomizeAppBuilder(builder);
- result = result.UseSkia();
- result = result.WithInterFont();
-
- //if (Runtime.Arch == Arch.SIMULATOR)
- result = result.With(new iOSPlatformOptions { RenderingMode = [iOSRenderingMode.OpenGl] });
-
- return result;
- }
- }
|