Skip to content

Native Hosting

For .NET native apps that don’t use MAUI, Shiny provides base classes that wire up all the platform lifecycle hooks automatically. You inherit from Shiny’s base classes and override a single method to configure your services.

  1. Install the NuGet package

    NuGet package Shiny.Hosting.Native
  2. Create your platform entry points

    Inherit from ShinyAppDelegate:

    using Shiny;
    using Shiny.Hosting;
    using Foundation;
    using UIKit;
    namespace YourNamespace;
    public class MyDelegate : ShinyAppDelegate
    {
    protected override IHost CreateShinyHost()
    {
    var builder = HostBuilder.Create();
    // Register your Shiny modules and services here
    return builder.Build();
    }
    public override bool FinishedLaunching(
    UIApplication application,
    NSDictionary launchOptions)
    {
    // Your launch code here — don't call Shiny before base
    return base.FinishedLaunching(application, launchOptions);
    }
    }