Agent skill
iOS App Lifecycle
Standards for AppDelegate, SceneDelegate, Deep Linking, and Background Tasks.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/app-lifecycle
Metadata
Additional technical details for this skill
- labels
-
ios lifecycle scenedelegate background-tasks
- triggers
-
{ "files": [ "AppDelegate.swift", "SceneDelegate.swift" ], "keywords": [ "didFinishLaunchingWithOptions", "willConnectTo", "backgroundTask", "Shortcut", "UserActivity" ] }
SKILL.md
iOS App Lifecycle Standards
Priority: P0
Implementation Guidelines
App & Scene Delegate
- SceneDelegate: Use for UI windows and scene-specific state in iOS 13+.
- AppDelegate: Focus on app-wide setup (DI, Analytics, Push notification registration).
- Slim Delegates: Move initialization logic to dedicated
BootstrapperorAppCoordinator.
Deep Linking
- Universal Links: Prefer over custom URL schemes. Handle via
scene(_:continue:userActivity:). - Handling logic: Routing should be handled by the Root Coordinator to navigate to specific screens.
Background Tasks
- Background Fetch: Use
BGTaskSchedulerfor periodically refreshing data. - Expiration: Handle
expirationHandlerto avoid app kill by the system.
Anti-Patterns
- Fat AppDelegate:
**No complex logic in didFinishLaunching**: Use a Bootstrapper service. - Direct UI in AppDelegate:
**No UIWindow setup in AppDelegate**: Use SceneDelegate for iOS 13+. - Blocking Launch:
**No synchronous network calls in launch**: Move to background thread or defer.
References
- Lifecycle & Background Tasks
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?