uikit-app-modernizationlisted
Install: claude install-skill tartinerlabs/skills
# UIKit App Modernization Skill
## Purpose
Modernize UIKit apps to behave correctly on modern iOS by:
- Eliminating references to legacy shared-state APIs
- Migrating from application lifecycle to scene lifecycle
- Supporting dynamic scene sizing and multi-window environments
## Scope
This skill performs **specific, targeted modernizations** in both **Swift and Objective-C** codebases:
- Replace legacy shared-state APIs with context-appropriate modern APIs
- Migrate to scene-based lifecycle
- Update apps to support a resizable user interface by removing usage of:
- main screen (`UIScreen.mainScreen`, `UIScreen.main`)
- interface orientation (`interfaceOrientation`)
- assumptions of symmetric safe areas (`safeAreaLayoutGuide`, `safeAreaInsets`)
## Core Principles
1. **Closest to consumer** — Prefer information nearest the point of use (e.g., view's trait collection over window's).
2. **Always apply a replacement when the target API is present.** A TODO alone is a failure. **An empty diff for a file containing the target API is also a failure.** If the file contains the target deprecated API and a concrete replacement is feasible under any pattern in the active task's reference file, apply it. Only skip when the target API appears exclusively inside dead code (`#if 0`/`#endif`). When uncertain between two valid replacements, pick the one that best fits the user's request rather than producing an empty diff. **Never silently skip a file**: if you are unwilling to app