Skip to content
Back to skills

Swift Adaptive Layout Pro

ASecurity

Deep-reviews Apple apps for resizable-window and iPhone Duo readiness — the UIScene lifecycle mandate, size-class vs idiom/orientation branching, UIScreen.main and hardcoded-geometry removal, arrangements and hinge handling, asymmetric safe areas, state continuity across fold and resize, and Device Hub test coverage. Use when preparing an app for iPhone Duo or the iOS 27 resizability default, auditing iPad multitasking behavior, or reading, writing, or reviewing adaptive layout code in SwiftU...

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentsswiftapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add kelvinkosbab/AppBootstrapAI --skill swift-adaptive-layout-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swift Adaptive Layout Pro?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Swift Adaptive Layout Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kelvinkosbab-swift-adaptive-layout-pro/badge)](https://www.skillsdirectory.com/skills/kelvinkosbab-swift-adaptive-layout-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: swift-adaptive-layout-pro
description: Deep-reviews Apple apps for resizable-window and iPhone Duo readiness — the UIScene lifecycle mandate, size-class vs idiom/orientation branching, UIScreen.main and hardcoded-geometry removal, arrangements and hinge handling, asymmetric safe areas, state continuity across fold and resize, and Device Hub test coverage. Use when preparing an app for iPhone Duo or the iOS 27 resizability default, auditing iPad multitasking behavior, or reading, writing, or reviewing adaptive layout code in SwiftUI or UIKit.
license: MIT
metadata:
  author: AppBootstrapAI contributors
  version: "1.0"
  grounded_in: "Apple Developer Tech Talks 'Prepare your app for iPhone Duo' and 'Strike a pose with adaptive layouts on iPhone Duo', HIG 'Designing for iPhone Duo', iOS 27 / 27.1 SDK behavior"
---

Review Apple app code for resizable-window and foldable readiness. This is the deep-review companion to the always-on `apple-adaptive-layout.md` rule — the rule steers while writing; this skill audits whole screens and the project's launch configuration. The Apple sibling of `android-adaptive-layout-pro`. Report only genuine problems; don't nitpick.

Applies to SwiftUI and UIKit (including Mac Catalyst). If asked to **write or fix** rather than review, make the changes directly and summarize them in the same file-by-file format.

Review process:

1. Check launch and resizability posture using `references/readiness-checklist.md` — the UIScene lifecycle mandate, `UIRequiresFullScreen`, Info.plist and project settings, SDK level.
2. Audit layout branching using `references/size-classes-and-idiom.md` — size classes vs idiom/orientation, `UIScreen.main` and global geometry, which containers already adapt.
3. Audit foldable-specific behavior using `references/duo-and-poses.md` — arrangements, hinge and reserved regions, safe-area asymmetry, state continuity across fold and resize.

If doing a partial review, load only the relevant reference files.

## Core Instructions

- **Launch blockers outrank everything.** An app on the legacy app lifecycle doesn't launch against the latest SDK — find that first and report it above any styling finding.
- **The unit of adaptation is the window, not the device.** Any idiom check (`userInterfaceIdiom == .pad`), orientation check, or `UIScreen.main` read that drives layout is a finding regardless of how well it works on today's hardware — the iPhone Duo's inner display reports regular/regular while still being an iPhone.
- **Assume resizability is on.** Building against the iOS 27 SDK opts the app in; a layout that only works at one size is a bug waiting to ship, not a deliberate constraint. Flag the fixed-size assumption *and* whatever depended on it.
- **A fold or resize is a configuration change.** Trace selection, scroll position, text entry, and in-flight work across it — state derived from an old size is the continuity bug users notice.
- **Prefer the system containers.** Hand-rolled `if regular { HStack } else { VStack }` isn't wrong, but when `NavigationSplitView`, `TabView`+sidebar placement, or an `ArrangementView` fits, recommend it — they handle resize and back-navigation the custom code usually forgets.
- **Severity by user impact**: broken (won't launch, unusable layout, state loss on fold, stretched camera preview) > degraded (phone layout stretched wide, sidebar never shown on a regular-width display, symmetric safe-area math) > polish (missing concentric corners, unexercised poses).
- Cross-reference rather than duplicate: VoiceOver/keyboard semantics belong to `swift-accessibility-pro`; general SwiftUI API modernity to `swiftui-pro`.

## Output Format

Organize findings by file. For each issue: file/line, the violated principle, the context(s) affected (iPhone Duo folded / unfolded / iPad multitasking / resize / Mac Catalyst), and a brief before/after. Skip clean files. End with a prioritized summary, launch-blocking and broken-tier issues first.

Example finding:

### FeedViewController.swift

**Line 34: idiom check drives the layout — wrong on iPhone Duo's inner display and in iPad multitasking.**

```swift
// Before
if UIDevice.current.userInterfaceIdiom == .pad {
    showSidebar()
}

// After — branch on the space the window actually has
if traitCollection.horizontalSizeClass == .regular {
    showSidebar()
}
```

### Summary

1. **Launch-blocking:** app declares only the legacy lifecycle (no `UIScene` manifest) — will not launch against the latest SDK.
2. **Broken:** `UIScreen.main.bounds` sizes the camera preview in `CaptureView.swift` — stretched on the inner display.
3. **Degraded:** 4 idiom checks; symmetric safe-area math in `HeaderView.swift`.
4. **Polish:** no hinge handling on the media player, where tabletop posture would help.

End of example.

## References

- `references/readiness-checklist.md` — UIScene mandate, `UIRequiresFullScreen` semantics, SDK-level behavior, project/Info.plist audit, Device Hub and Previews test coverage.
- `references/size-classes-and-idiom.md` — size-class branching, the idiom/orientation/`UIScreen.main` removals, local geometry, which system containers adapt for free.
- `references/duo-and-poses.md` — `ArrangementView` / `UIArrangementViewController`, hinge and reserved regions, asymmetric safe areas, camera coordinators, state continuity across fold.

Files in this skill

  • SKILL.md5.3 KB
  • references/duo-and-poses.md7.7 KB
  • references/readiness-checklist.md5.3 KB
  • references/size-classes-and-idiom.md4.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.