MCPAsk AI

Search

Search skills, authors and topics

kemiljk / skills

dxe-apple-native-ui

Build or review native Apple interfaces, including platform controls, accessibility, state, navigation, and macOS window behavior.

Install

npx skills add https://github.com/kemiljk/skills --skill dxe-apple-native-ui
license
MIT

Apple Native UI

Build and review interfaces that feel native because they use the platform's interaction, accessibility, and adaptation contracts—not because they imitate a screenshot.

Start with the target

Identify the platforms, minimum OS versions, SwiftUI versus UIKit/AppKit boundary, supported input (touch, pointer, keyboard, VoiceOver, Digital Crown, remote, eye/hand), and primary form factors. Do not apply an iPhone convention to macOS, iPad multitasking, watchOS, tvOS, or visionOS without evidence that it transfers.

Prefer system controls, semantic colors, text styles, safe-area APIs, navigation containers, and presentation APIs before custom reconstructions. Custom UI must retain the equivalent accessibility, focus, state, and cancellation behaviour.

Fresh platform guidance

Before prescribing or implementing APIs, behaviour, design conventions, or verification that may vary by SDK or OS release, search current primary Apple sources: Apple Developer Documentation, Human Interface Guidelines, and relevant WWDC sessions. Check the project's deployment target before recommending a newer API, and distinguish current Apple guidance from repository-local compatibility constraints. The examples here express durable contracts; they are not a substitute for release-specific documentation.

iOS and iPadOS workflow

When iOS or iPadOS is a target, load the reference that matches the work before planning, building, or reviewing anything non-trivial. Load only what the task touches.

WorkRead
Custom controls, list rows, modals, gestures, animation, text layout, or any accessibility claimreferences/ios-accessibility.md [blocked]
App structure: purpose and scope, navigation model, bars, modality, feedback, colour, copy, gesturesreferences/ios-design-decisions.md [blocked]
How it feels in use: first run, launch, scrolling, loading and empty states, search, undo, menus, keyboard and pointer, text, symbols, motion, haptics, localisation, purchases, exportreferences/ios-experience-quality.md [blocked]
A system capability: windows, drag and drop, appearance, power state, notifications, permissions, web content, widgets, App Intents, Spotlight, quick actions, extensions, deep links, Handoff, CloudKit, App Clips, printing, media, Maps, Vision, Pencilreferences/ios-system-integration.md [blocked]

Eight checks catch most iOS defects. Run them on every review, whichever reference is loaded:

  1. Nothing is gesture-only. Every swipe, drag, pinch, long press, and tap-outside has a visible or assistive equivalent.
  2. Nobody gets trapped. Every modal, sheet, and overlay has an exit that VoiceOver can reach.
  3. Text survives its worst case. No fixed font sizes; informative text wraps; the screen scrolls on the smallest device at the largest text size.
  4. Settings apply live. Text size, appearance, Reduce Motion, Reduce Transparency, and Low Power Mode are observed, not read once.
  5. Layout follows space, not device. Branch on size class or available width, never on idiom. An iPad window can be phone-width.
  6. Nothing blocks on unrequested work. No launch into a spinner, no main-thread loading, and content never blinks in unannounced.
  7. Mistakes are reversible. Editing registers undo; destructive actions confirm; controls are never enabled while doing nothing.
  8. Entry points handle any state. A notification, link, quick action, widget, or Spotlight result works on cold launch, while signed out, and with missing data.

The references carry opinions as well as contracts, and their release-specific detail dates. The requirement above to check current Apple guidance still applies.

macOS workflow

When macOS is an intended target, read references/macos-native-workflows.md [blocked] before planning, building, porting, or reviewing a non-trivial interface. It adds a Mac-specific workflow for commands, windows and documents, selection and focus, pasteboard and drag/drop, undo, state restoration, configuration, Finder interoperability, and behaviour-led verification.

Treat a Mac version as a distinct workflow even when it shares models or views with iPadOS. A resizable iPad layout is not by itself a complete Mac app.

State and identity

Own state at the narrowest stable boundary. A child that only displays data receives a value; a child that edits parent state receives a binding. Keep side effects out of body and give lists stable identities.

swift
@Observable final class ProfileModel {    var name = ""    var isSaving = false}
struct ProfileScreen: View {    @State private var model = ProfileModel()
    var body: some View {        Form {            TextField("Name", text: $model.name)            Button("Save") { save() }                .disabled(model.name.isEmpty || model.isSaving)        }    }}

Do not turn an injected value into @State, use positional indices as mutable list identity, or use onTapGesture where Button, NavigationLink, Toggle, or another native control expresses the task.

Platform contracts

  • Use NavigationStack/NavigationSplitView, sheets, alerts, confirmation dialogs, and toolbars according to the target platform. Verify back, dismiss, cancel, and focus-restoration paths.
  • Use semantic colors and Dynamic Type-aware typography. Test extra-large text before adding truncation, clipping, or fixed frames.
  • Treat safe areas, split view, window resizing, rotation, external keyboard, pointer, and layout direction as input to the layout—not exceptional breakpoints.
  • Prefer @Observable, @State, @Binding, and @Bindable where deployment targets permit; gate version-specific APIs and provide a real fallback.
  • Make animations value-driven and task-preserving under Reduce Motion. Wait for the observable end state before testing or reporting it.

Accessibility

Accessibility is expressed through the native accessibility tree, not ARIA. Check VoiceOver labels, values, hints, traits, grouping, reading order, adjustable actions, focus movement, and disabled controls. Hide decorative imagery; label meaningful images and ambiguous icons.

swift
Button(action: play) {    Image(systemName: "play.fill")}.accessibilityLabel("Play preview")
Image(systemName: "sparkles")    .accessibilityHidden(true)

On iOS and iPadOS this is the floor. references/ios-accessibility.md [blocked] covers flattening rows and restoring their actions, Switch Control and Voice Control, Dynamic Type layout, and live preference handling.

Read references/apple-verification.md [blocked] for simulator, device, XCUITest, accessibility, and form-factor evidence, and for iOS probes: launch arguments, simctl entry-point tests, and Instruments templates. Read it before making native verification claims.

Review output

Anchor findings to a source path or an observed target/device. State whether evidence is source-only or rendered. Name the affected platform and input method; an iOS finding is not automatically a macOS finding.

Prefer / reject

PreferReject
System control with intentional stylingClickable stacks or images standing in for controls
Semantic fonts, colors, and adaptive layoutFixed dimensions that break at larger text or smaller windows
Stable IDs and explicit state ownershipIndex identity and effects hidden in body
Platform-specific verificationTreating a simulator screenshot as proof for every target
Version gates with useful fallbacksUnconditional new APIs that silently drop supported users