Skip to content

Conversation

@ChrisPulman
Copy link
Member

This pull request introduces a new .NET MAUI example application to the repository, demonstrating how to use the Extensions.Hosting.Maui library for cross-platform app development. The changes include the addition of a fully structured MAUI sample app, platform-specific files for Android, MacCatalyst, and Windows, as well as integration with the hosting and dependency injection system.

The most important changes are:

Addition of the MAUI Example Application:

  • Introduced a new project file Extensions.Hosting.Maui.Example.csproj targeting Android, iOS, MacCatalyst, and Windows, with all necessary configuration for resources, dependencies, and build settings.
  • Added main application files (App.xaml, App.xaml.cs, AppShell.xaml, AppShell.xaml.cs, MainPage.xaml, MainPage.xaml.cs) to define the app structure, navigation, and UI. [1] [2] [3] [4] [5] [6]

Integration with Hosting and Dependency Injection:

  • Implemented MauiProgram.cs to set up the host, register services and pages, and configure the MAUI context, demonstrating the use of ReactiveMarbles.Extensions.Hosting.Maui.
  • Added an example service ExampleMauiService implementing IMauiService to show service registration and initialization.

Platform-Specific Implementations:

  • Included Android platform files: AndroidManifest.xml, MainActivity.cs, MainApplication.cs, and resource files for colors and icons. [1] [2] [3] [4]
  • Added MacCatalyst platform files: AppDelegate.cs, Info.plist, Entitlements.plist, and Program.cs. [1] [2] [3] [4]
  • Added Windows platform entry point: App.xaml.

Minor Improvements:

  • Updated the IUiContext interface documentation to generalize the application running state property.

Introduces the Extensions.Hosting.Maui project, providing integration between .NET MAUI and Microsoft.Extensions.Hosting. Includes interfaces and implementations for configuring MAUI applications, registering pages and shells, managing the MAUI application lifecycle, and supporting dependency injection and hosted services for MAUI apps.
Introduces MauiAppBuilder to IMauiBuilder and MauiBuilder, updates extension methods to support MauiApp configuration, and refactors main page setup logic. Also modernizes AppMixins in example projects to use file-scoped namespaces and static classes. These changes improve flexibility and consistency in Maui app hosting and configuration.
Introduces a new Extensions.Hosting.Maui.Example project demonstrating usage of the hosting extensions in a .NET MAUI application. Includes platform-specific files for Android, iOS, MacCatalyst, and Windows, shared resources, styles, and example pages. Updates the solution file to include the new project.
Reformatted the Extensions.Hosting.Maui.Example.csproj file for improved readability and consistency. No functional changes were made.
Refactored .nuke/build.schema.json to use shared definitions for Host, ExecutableTarget, and Verbosity, and restructured the schema for better maintainability. Updated the Restore target in Build.cs to include DotNetWorkloadRestore before DotNetRestore for improved workload management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants