Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

SwiftUI Multiplatform Design Guide

БесплатноБез исполняемых скриптовНе проверен

Unified SwiftUI architecture for iOS, iPadOS, macOS, and visionOS with spatial design principles.

mosif16от mosif16★ 18 звёзд на GitHub16 установок в других каталогах

Об этом скилле

Unified Architectures in SwiftUI: A Comprehensive Design Strategy for iOS, iPadOS, macOS, and visionOS

1. Introduction: The Convergence of Spatial and Flat Computing

The contemporary landscape of Apple software development is defined by a radical convergence of interaction paradigms. Historically, the demarcation lines between platforms were rigid: iOS was governed by the touch target and the direct manipulation of glass; macOS was the domain of the precise cursor and the indirect abstraction of the mouse; and iPadOS occupied a liminal space, attempting to bridge the two. The introduction of visionOS, however, has fundamentally disrupted this tiered architecture. It has necessitated a new design language that is not merely responsive in terms of screen size, but adaptive in terms of physical dimension, input modality, and user intent.

This report provides an exhaustive analysis of the architectural strategies required to build truly multiplatform applications using SwiftUI. It moves beyond the superficial concept of "cross-platform" code sharing---often synonymous with the "lowest common denominator" approach---and instead advocates for a unified state-driven architecture that respects the distinct ergonomics of each device. We will explore the "Liquid Glass" metaphor that now underpins Apple's visual language, the complex hierarchy of scenes and windows, and the unified input models that allow a single semantic action to be triggered by a tap, a click, or a gaze-driven pinch.

1.1 The Evolution of Human Interface Guidelines

The Apple Human Interface Guidelines (HIG) have evolved from static sets of rules for distinct platforms into a fluid, overarching philosophy of design. The core pillars of this philosophy---Space, Immersion, Passthrough, and Spatial Audio---are no longer exclusive to the headset.^1^ They represent a shift toward "Spatial Computing" that influences even flat interfaces. For instance, the layering and depth effects found in visionOS icons are conceptually linked to the parallax effects on tvOS and the fluid animations of iOS.^2^

A critical insight from this evolution is the concept of "Pass-through" design, not just in the optical sense of seeing the real world, but in the interface sense of minimizing obstruction. On iOS, this manifests as translucent materials and sheets; on visionOS, it is literal transparency. Designing for this requires a "content-first" approach where the "chrome" (interface elements) recedes. The HIG explicitly advises using windows for UI-centric experiences while reserving immersion for distinctive moments, a pattern that mirrors the modal presentations on iOS.^1^

1.2 The Role of App Icons in Multiplatform Identity

The entry point to any application, the app icon, serves as the first lesson in multiplatform adaptation. While often overlooked as a mere asset, the icon's behavior dictates user expectations. On iOS, icons are flattened super-ellipses that respond to home screen layout shifts. On macOS, they act as uniform "chicklets" with drop shadows to imply a desktop metaphor. However, on tvOS and visionOS, the icon becomes a layered, three-dimensional object.

Research into the construction of these icons reveals a "Liquid Glass" aesthetic where layers coalesce to create dimensionality. On visionOS, an icon typically consists of a background layer and one or two foreground layers. When the user gazes at the icon, the system applies specular highlights and a parallax effect, physically lifting the foreground layers to meet the user's eye.^2^ This is not merely cosmetic; it acts as a primer for the user, teaching them that "looking" is an interactive act. An effective multiplatform architecture must therefore extend this layered thinking into the app itself, treating UI elements not as flat pixels, but as planes floating in a hierarchy, ready to react to the "focus" of the eye or the pointer.

2. The Hierarchy of Scenes: Windows, Volumes, and Spaces

In the SwiftUI lifecycle, the Scene protocol has supplanted the View as the fundamental unit of application structure. While the View defines what the user sees, the Scene defines how the operating system manages that content's existence, persistence, and lifecycle. A mastery of Scene types---specifically WindowGroup, DocumentGroup, and ImmersiveSpace---is the prerequisite for building apps that scale from the iPhone SE to the Vision Pro.

2.1 The WindowGroup Paradigm and Lifecycle Management

The WindowGroup is the workhorse of SwiftUI. It defines a template for the application's primary interface. However, its behavior is radically polymorphic depending on the host platform. On iPhone, it generally instantiates a single, persistent window. On iPadOS and macOS, it serves as a factory for creating multiple, concurrent windows.^4^

This polymorphism introduces significant architectural complexity regarding state management. A common anti-pattern in early SwiftUI deve

Полный SKILL.md на GitHub

Установить SwiftUI Multiplatform Design Guide в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл SwiftUI Multiplatform Design Guide?

Unified SwiftUI architecture for iOS, iPadOS, macOS, and visionOS with spatial design principles.

Как установить скилл SwiftUI Multiplatform Design Guide?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл SwiftUI Multiplatform Design Guide запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить SwiftUI Multiplatform Design Guide с