Core.Maui 0.3.78

Core.Maui

Product-neutral MAUI library for native application hosts. It includes the MAUI projection of the workspace spatial/density system, legacy shared login and forgot-password pages, API-key client support, secure-storage helpers, shell adapters, device services, and other reusable platform mechanics.

Spatial and density kit

Core.Presentation.Spatial owns the framework-neutral 2/4/6-unit rhythm, complete primitive ladder, Compact / Standard / Comfortable recipes, accessible interaction-target arithmetic, and persisted-preference migration helpers. Core.Maui.Spatial maps the current MAUI device idiom and platform to that neutral contract and updates the shared resource aliases.

Merge Resources/Styles/SpatialRhythm.xaml into the product application resources, then apply the stored preference after startup and whenever it changes:

var metrics = MauiSpatialResources.ApplyForPreference(
    Application.Current!.Resources,
    storedDensityPreference);

The XAML dictionary ships at contentFiles/any/any/Resources/Styles/SpatialRhythm.xaml in the Core.Maui package. Product apps may add named component geometry, insets, and responsive breakpoints; they must not redefine the primitive ladder, density vocabulary, recipes, or target-floor arithmetic. The existing generated spacing.kendo.* dictionary remains a theme projection and is not the spatial system.

Authentication parity posture

The existing API-key/password page, bearer-token storage, provider interfaces, and biometric helper are foundations—not parity with the canonical broker contract. Durable rotating sessions, broker password challenges, TOTP/recovery, passkey/platform-credential integration, current authorization context, broker-aware logout, and account/session management remain planned neutral adapters.

Products must not interpret local biometric unlock as broker MFA or copy portal-cookie behavior into native code. Native clients use OS-protected credential storage and native browser/callback flows over the same broker semantics. See the canonical authentication and authorization capability and cross-surface parity plan.

Neutral shell adapter

Core.Maui.ShellAdapters.MauiShellCatalogAdapter maps Core.Shell destinations to product-resolved native routes and deep links and derives stable automation IDs. Products own catalogs, route maps, back behavior, visibility policy, workflows, and authorization. The adapter does not copy portal CSS or make customer, field, and operator apps visually identical.

API-key login and shared pages

  • Pages: LoginPage, ForgotPasswordPage (in Core.Maui.Pages)
  • ViewModels: LoginPageViewModel, ForgotPasswordPageViewModel (in Core.Maui.ViewModels)
  • Services: IAuthStateService, AuthStateService (in Core.Maui.Services)
  • Config: IApiKeyLoginAppConfig, ApiKeyLoginAppConfig (app display name, API base URL, API key, optional required user type). For driver apps, use IDriverAppConfig / DriverAppConfig which enforces UserTypes.Driver on login.

Using in a MAUI app

  1. Add a reference to Core.Maui.
  2. In MauiProgram: register IDriverAppConfig or IApiKeyLoginAppConfig (e.g. new DriverAppConfig("App Name", apiBaseUrl, apiKey) or new ApiKeyLoginAppConfig(..., requiredUserType: UserTypes.Customer)), AuthApiClient, IAuthStateService/AuthStateService, and the shared view models/pages. Set AuthStateService.Instance after building the app.
  3. Add AppShell with flyout items for Login, Dashboard, ForgotPassword; use xmlns:pages="clr-namespace:Core.Maui.Pages" and ContentTemplate="{DataTemplate pages:LoginPage}" etc. Wire auth (e.g. OnNavigating, LoggedIn).
  4. Ensure the app’s Colors.xaml defines Primary and Gray100 (and any other keys used by shared pages).

Theme keys used by shared pages

  • Primary – Sign In / Back to Login buttons, Forgot Password link
  • Gray100 – Frame backgrounds (if used)

Other Core.Maui features

  • Biometric authentication, Apple/Google sign-in, push notifications, and related interfaces (see project files).
  • Device permission safety via IDevicePermissionService, IDevicePermissionPlatform, and MauiDevicePermissionPlatform.
  • Deferred notification prompt sequencing via INotificationPromptCoordinator and MauiDeferredUiActionDispatcher.

Biometric provider boundary

Apps consume IBiometricAuthenticationService; the third-party provider is an implementation detail. Core.Maui uses the stable .NET 10 Plugin.Maui.Biometric package and must not expose its request, response, or status types in Core's public API. Product apps own the platform permission descriptions required by their Android manifest and Apple Info.plist.

Device permission safety

Register the shared permission services in each MAUI app:

builder.Services.AddSingleton<IDevicePermissionPlatform, MauiDevicePermissionPlatform>();
builder.Services.AddSingleton<IDevicePermissionService, DevicePermissionService>();

Use IDevicePermissionService for optional device capabilities such as location, notifications, camera, photos, media, microphone, and contacts. Optional capabilities should quietly fall back when permission is denied, restricted, unavailable, disabled, or throws a platform permission exception. Do not show a blocking modal for optional context like distance sorting.

var location = await devicePermissionService.RunIfGrantedAsync<Location>(
    DevicePermissionKind.LocationWhenInUse,
    _ => Geolocation.GetLastKnownLocationAsync());

Notification prompt sequencing

Register the shared notification prompt coordinator in each MAUI app that may request push notification permission after sign-in:

builder.Services.AddSingleton<IDeferredUiActionDispatcher, MauiDeferredUiActionDispatcher>();
builder.Services.AddSingleton<INotificationPromptCoordinator, NotificationPromptCoordinator>();

Use it from the logged-in home or equivalent stable surface. The app owns the actual push registration behavior; Core.Maui owns the delay, once-per-session guard, and exception callback shape.

notificationPromptCoordinator.QueueAfterStableSurface(
    () => pushNotificationsRegistrationService.EnsurePushSetupAfterLoginAsync(),
    shouldQueue: () => currentUser != null,
    options: new NotificationPromptCoordinatorOptions(
        TimeSpan.FromSeconds(1),
        exception => logger.LogError(exception, "Notification prompt failed.")));

No packages depend on Core.Maui.

Version Downloads Last updated
0.3.82 2 08/13/2026
0.3.81 4 08/13/2026
0.3.80 3 08/12/2026
0.3.79 4 08/12/2026
0.3.78 3 08/12/2026
0.3.77 39 07/20/2026
0.3.76 4 07/19/2026
0.3.60 3 07/14/2026
0.3.59 3 07/14/2026
0.3.58 3 07/14/2026
0.3.57 3 07/14/2026
0.3.56 3 07/14/2026
0.3.27 4 07/05/2026
0.3.26 6 07/05/2026
0.3.24 5 07/03/2026
0.3.11 12 06/19/2026
0.3.10 4 06/19/2026
0.3.9 4 06/19/2026
0.3.8 4 06/19/2026
0.3.7 4 06/19/2026
0.3.6 4 06/18/2026
0.3.5 4 06/18/2026
0.3.4 7 06/10/2026
0.3.0 6 06/02/2026
0.2.0 5 06/02/2026
0.1.3-local.1 6 06/10/2026
0.1.2 6 05/31/2026
0.1.2-local.1 4 06/10/2026
0.1.1 6 05/28/2026
0.1.0 9 05/23/2026
0.1.0-alpha.7 5 05/21/2026
0.1.0-alpha.6 5 05/21/2026
0.1.0-alpha.5 5 05/21/2026
0.1.0-alpha.4 6 05/21/2026
0.1.0-alpha.3 5 05/21/2026
0.1.0-alpha.2 6 05/20/2026