AppDelegate.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. using Avalonia;
  2. using Foundation;
  3. using Avalonia.iOS;
  4. using InABox.Avalonia.Platform;
  5. using InABox.Avalonia.Platform.iOS;
  6. namespace PRS.DigitalKey.iOS;
  7. // The UIApplicationDelegate for the application. This class is responsible for launching the
  8. // User Interface of the application, as well as listening (and optionally responding) to
  9. // application events from iOS.
  10. [Register("AppDelegate")]
  11. #pragma warning disable CA1711 // Identifiers should not have incorrect suffix
  12. public partial class AppDelegate : AvaloniaAppDelegate<App>
  13. #pragma warning restore CA1711 // Identifiers should not have incorrect suffix
  14. {
  15. protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
  16. {
  17. PlatformTools.Register<IDeviceId, iOS_DeviceId>();
  18. PlatformTools.Register<IAppVersion,iOS_AppVersion>();
  19. PlatformTools.Register<IImageTools, iOS_ImageTools>();
  20. PlatformTools.Register<IPdfRenderer, iOS_PdfRenderer>();
  21. PlatformTools.Register<IBluetooth, iOS_Bluetooth>();
  22. return base.CustomizeAppBuilder(builder)
  23. //.With(new iOSPlatformOptions { RenderingMode = [iOSRenderingMode.OpenGl] })
  24. .WithInterFont();
  25. }
  26. }