maui-app-lifecycle

Map .NET MAUI app lifecycle events across Android, iOS, and Windows.

Updated Dec 25, 2025
One-click install
npx skills add https://github.com/heldercsousa/MyVocaList --skill maui-app-lifecycle-heldercsousa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-app-lifecycle
Source: https://github.com/heldercsousa/MyVocaList/tree/main/.claude/skills/maui-app-lifecycle
Command: npx skills add https://github.com/heldercsousa/MyVocaList --skill maui-app-lifecycle-heldercsousa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MAUI app lifecycle guidance covering the four states (Not Running, Running, Deactivated, Stopped), cross-platform Window lifecycle events, backgrounding and resume behaviour, platform-specific lifecycle mapping for Android and iOS/Mac Catalyst, and state-preservation patterns.

Core Features & Use Cases

  • Cross-platform lifecycle mapping: understand and instrument state transitions and window events across Android, iOS/Mac Catalyst, and Windows.
  • State preservation patterns: strategies to save and restore transient UI state during backgrounding and resume.
  • Guidance for common scenarios: how to handle OnStart, OnSleep, OnResume, and window lifecycle events in typical app flows.

Quick Start

Ask for a concise overview of the MAUI app lifecycle and apply the guidance to instrument lifecycle events in a sample MAUI project.

Frequently Asked Questions about maui-app-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the main lifecycle events in a .NET MAUI app?

The main .NET MAUI app lifecycle events are OnStart, OnSleep, and OnResume, which manage transitions across the four app states: Not Running, Running, Deactivated, and Stopped. These events handle typical app flows and window lifecycle events.

How do I preserve state during backgrounding in .NET MAUI?

To preserve state during backgrounding in .NET MAUI, use state-preservation patterns to save and restore transient UI state during the OnSleep event, and restore it during OnResume to handle backgrounding and resume behavior correctly.

Does .NET MAUI lifecycle mapping work across Android, iOS, and Windows?

Yes, .NET MAUI lifecycle mapping works cross-platform across Android, iOS/Mac Catalyst, and Windows. It instruments state transitions and window lifecycle events consistently, mapping platform-specific lifecycle behavior for each operating system.

Can I use MAUI lifecycle events for page navigation?

No, you should not use MAUI lifecycle events for page navigation events or platform API specifics. The functional scope is limited to mapping app lifecycle events and state preservation patterns across typical app flows.

What is the best way to handle window lifecycle events in MAUI?

The best way to handle window lifecycle events in MAUI is to instrument cross-platform window events directly within your app lifecycle flow, ensuring consistent behavior across Android, iOS/Mac Catalyst, and Windows platforms.