uikit-app-modernization

Modernize UIKit app code for scene lifecycle and safe-area APIs.

11|2|Updated Sep 8, 2015
One-click install
npx skills add https://github.com/jitrapon/astro-mobile --skill uikit-app-modernization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uikit-app-modernization
Source: https://github.com/jitrapon/astro-mobile/tree/main/.claude/skills/uikit-app-modernization
Command: npx skills add https://github.com/jitrapon/astro-mobile --skill uikit-app-modernization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill updates legacy UIKit code so it works correctly on modern iOS, where shared screen assumptions, old orientation checks, and app-only lifecycle patterns can break in multi-window and resizable scenes.

Core Features & Use Cases

  • UIScreen and layout modernization: Replaces window-relative screen usage with context-aware APIs and safer view or scene sources.
  • Orientation and scene migration: Moves layout logic away from deprecated orientation state and toward scene lifecycle patterns.
  • Safe-area correctness: Fixes hardcoded inset math so interfaces adapt to modern device geometry, split view, and dynamic safe areas.
  • Use case: A mobile team can use this Skill to refactor an existing UIKit app for iPad multitasking, Stage Manager, and current iOS SDK expectations without redesigning the app.

Quick Start

Ask this skill to modernize your UIKit files for scene lifecycle, safe area, orientation, and screen-relative API usage while preserving the app’s existing behavior.

Frequently Asked Questions about uikit-app-modernization

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

FAQPage Schema
How do I migrate UIKit code away from deprecated UIScreen.main APIs?

Migrating UIKit code from deprecated UIScreen.main APIs involves replacing window-relative screen usage with context-aware APIs and safer view or scene sources. This preserves existing behavior while adapting interfaces to multi-window iOS environments.

Why does my iOS app layout break in iPad multitasking and Stage Manager?

Legacy shared screen assumptions and old orientation checks fail in resizable scenes, causing layout breaks in iPad multitasking. Modernizing UIKit requires moving layout logic toward scene lifecycle patterns and safe-area inset updates.

How to handle deprecated orientation checks in iOS UIKit apps?

To handle deprecated orientation checks in iOS UIKit apps, move layout logic away from deprecated orientation state toward scene lifecycle patterns. This ensures interfaces adapt correctly to modern multi-window iOS SDK expectations.

Does this UIKit modernization approach work with both Swift and Objective-C?

Yes, this UIKit modernization approach applies to both Swift and Objective-C modernization tasks. It handles scene lifecycle migration, orientation checks, and safe-area inset updates while preserving the app's existing behavior.

What is the best way to fix hardcoded safe-area inset math in legacy UIKit?

Fixing hardcoded safe-area inset math requires applying safe-area or scene-based layout rules. This updates legacy UIKit interfaces to adapt correctly to modern device geometry, split view, and dynamic safe areas.

Can I refactor an existing UIKit app for multi-window iOS without redesigning it?

Yes, you can refactor an existing UIKit app for multi-window iOS without redesigning it. This modernization uses deprecation-and-forward wrappers and trait-change invalidation to preserve existing app behavior.