Command Palette

Search for a command to run...

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

swift-dev

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

Native iOS and macOS apps in Swift 6 - SwiftUI, AppKit, SwiftData, concurrency, Swift Testing, XcodeGen, CallKit and audio, App Intents, push, devices…

tenequmот tenequm689 установок в других каталогах

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

Swift Apple Development (iOS + macOS)

Native apps for iPhone and Mac with Swift 6.4 and Xcode 27.2 (Swift 6.4.2; iOS 27.2 and macOS 27.2 SDKs - there is no macOS 27.1; Xcode 27.3 is at beta 2). Xcode 27 runs only on Apple silicon and needs macOS 26.6 or later. Deployment targets: iOS 17 / macOS 14 for @Observable and SwiftData; iOS 26 / macOS 26 for Liquid Glass, Foundation Models, IntentModes and Observations.

This file is the platform-neutral core plus a router. Load a reference only when the task needs it - the Platform tables say which.

Start here

Task Default
New iOS app XcodeGen project.yml (generated .xcodeproj gitignored) + logic in a local SPM package - ios-project-setup.md
New Mac app XcodeGen for a full app; a bare SPM executable only for CLIs and small agents (manual .app assembly in spm-and-builds.md)
Logic, models, networking A local SPM package with platforms: [.iOS(.v26), .macOS(.v15)], tested with swift test on the Mac - no simulator
Run on an iPhone ios-devices-and-signing.md (Developer Mode, devicectl, automatic signing flags)
Ship iOS: ios-distribution.md (TestFlight, App Store). Mac: macos-distribution.md (Developer ID + notarization, Mac App Store)
CI GitHub Actions: ci-github-actions.md (runner and exact Xcode, compilation cache, required-check gate, simulators on runners)

SPM alone cannot produce an iOS .app - an app target needs an Xcode project, which is why XcodeGen generates one. XcodeGen traps (details and fixes in ios-project-setup.md):

  • Files added after xcodegen generate are silently left out of the build (even with syntax errors) until you regenerate - use the syncedFolder source type or regenerate before every build; xcodegen generate --use-cache makes that cheap (it skips the write when the spec and file list are unchanged).
  • The generated Info.plist hardcodes version 1.0 (1) and ignores MARKETING_VERSION / CURRENT_PROJECT_VERSION unless you map them in info.properties.
  • Gitignoring all of *.xcodeproj/ also drops Package.resolved, so clean clones float to the newest dependency versions. Keep that one file committed.
  • XcodeGen's defaults are SWIFT_VERSION 5.0 and iPhone+iPad; set both explicitly.

Build and test from the command line

swift test --package-path Core                      # logic, on the Mac, seconds
xcodegen generate                                   # project.yml -> App.xcodeproj
xcodebuild -project App.xcodeproj -scheme App \
  -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO build   # compile check, no signing
xcodebuild -project App.xcodeproj -scheme App \
  -destination 'platform=iOS Simulator,name=iPhone 17' test           # needs a simulator runtime
xcrun simctl list runtimes                          # empty on a fresh Xcode
xcodebuild -downloadPlatform iOS                    # installs the iOS simulator runtime (GBs)
xcrun devicectl list devices                        # simulators and paired iPhones

Before writing a new-in-27 API from memory, read its declaration in the SDK's .swiftinterface - many SwiftUI modifiers live in SwiftUICore (spm-and-builds.md, xcodebuild basics).

Simulator.app is called DeviceHub.app in Xcode 27. simctl push never runs a Notification Service Extension, and notification calls can hang after a boot until dasd is restarted (ios-push-notifications.md). CallKit runs in the iOS 27 Simulator only with two Simulator-only stand-ins - claim the facetime URL scheme and activate the audio session yourself (ios-audio-and-callkit.md). UI tests in the Simulator can also press the Action Button, lock the screen and run App Intents out of process (testing.md). Starting a CallKit call or Live Activity from an App Intent while the app sits in the background needs the iOS 27 .phone.startCall App Schema; a plain AppIntent is refused (app-intents.md).

Concurrency (Swift 6 language mode)

Swift 6 mode makes data races compile errors. Two module-level defaults decide most of the friction:

// Package.swift target settings
swiftSettings: [
    .swiftLanguageMode(.v6),
    .defaultIsolation(MainActor.self),   // app targets: everything is @MainActor unless marked
]

In Xcode the same is SWIFT_VERSION = 6 and SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor (plus SWIFT_APPROACHABLE_CONCURRENCY = YES, which the Xcode 27 app template sets - that template still says SWIFT_VERSION = 5.0, so switch it to 6). SWIFT_STRICT_CONCURRENCY does nothing in Swift 6 mode - checking is already complete. Make app targets MainActor by default; leave library packages nonisolated. Misspelled enableUpcomingFeature names are silently ignored.

nonisolated struct Report: Decodable {               // see the conformance trap below
    let title: String
}

@concurrent
func decode(_ data: Data) async throws -> Report {   // always runs off the caller's a
Полный SKILL.md на ClawHub

Установить swift-dev в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл swift-dev?

Native iOS and macOS apps in Swift 6 - SwiftUI, AppKit, SwiftData, concurrency, Swift Testing, XcodeGen, CallKit and audio, App Intents, push, devices, TestFlight, code signing, notarization. Use for any iPhone or Mac app, helper or CLI work.

Как установить скилл swift-dev?

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

Скилл swift-dev запускает скрипты?

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

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

Сравнить swift-dev с