SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill maui-app-lifecycle명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
| name | maui-app-lifecycle |
| description | > Use when this capability is needed. |
Resumed only fires when returning from the Stopped state. On first launch the sequence is Created → Activated — Resumed is never called.
// ❌ Putting initialization logic in OnResumed — won't run on first launch
protected override void OnResumed()
{
LoadUserProfile(); // Skipped on cold start!
}
// ✅ Use OnActivated for logic that must run on every foreground entry
protected override void OnActivated()
{
LoadUserProfile(); // Runs on both first launch and resume
}
A dialog, split-screen, or notification pull-down triggers Deactivated without Stopped. Don't save heavy state on Deactivated — the app may never actually background.
// ❌ Heavy save on every deactivation — fires too often
protected override void OnDeactivated()
{
await SaveAllDataToDatabase(); // Wasteful for a dialog appearance
}
// ✅ Save state only when truly backgrounded
protected override void OnStopped()
{
await SaveAllDataToDatabase();
}
On Android, pressing the hardware back button may call Destroying without Stopped if the activity finishes. Critical save logic in OnStopped alone can be missed.
// ✅ Save in both Stopped and Destroying for safety on Android
protected override void OnStopped()
{
base.OnStopped();
SaveDraft();
}
protected override void OnDestroying()
{
base.OnDestroying();
SaveDraft(); // Catches Android back-button finish
}
On iPad, Mac Catalyst, and desktop Windows, each Window instance fires its own lifecycle events independently. Don't assume a single global lifecycle.
Long-running work in lifecycle handlers causes ANR kills on Android (5s timeout) and watchdog kills on iOS (limited background time).
// ❌ Blocking the lifecycle handler
protected override void OnStopped()
{
Thread.Sleep(3000); // ANR on Android!
SaveData();
}
// ✅ Fire-and-forget or use a brief async save
protected override void OnStopped()
{
base.OnStopped();
Preferences.Set("draft_text", _viewModel.DraftText); // Fast, synchronous
}
For larger state, use SecureStorage or file-based serialization — but keep it under 1–2 seconds.
iOS 13+ uses the scene lifecycle (SceneWillConnect, etc.). Older delegate methods are still forwarded by MAUI, but you should target scene-based APIs for modern iOS.
OnStoppedOnResumed — not in OnActivated (avoid double-restore)OnDeactivated — it fires too frequentlyOnDestroying (back-button case)Converted and distributed by TomeVault — claim your Tome and manage your conversions.