ios-native
БесплатноБез исполняемых скриптовНе проверенiOS native platform development with SwiftUI 6.x: app architecture (App protocol, Scene, WindowGroup), navigation (NavigationStack, NavigationSplitView)…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
iOS Native Development (SwiftUI + Platform APIs)
References: swiftui-architecture.md for App lifecycle, Scene/WindowGroup, navigation (NavigationStack with type-safe paths, NavigationSplitView), state management with
@Observable(Swift 5.9+ replacement for ObservableObject), focus, sheets/alerts. secure-storage.md for Keychain Services deep dive (access groups, biometric SAC, iCloud sync, key migration), Secure Enclave key generation, attestation. system-integration.md for Background Tasks (BGTaskScheduler), Universal Links (associated domains), App Groups, Share Extensions, Privacy Manifest, StoreKit 2.Deep Knowledge: Use
mcp__documentation__fetch_docswith technology:iosorswiftui.
App Entry Point (SwiftUI App Protocol)
import SwiftUI
@main
struct BHODLApp: App {
@State private var sessionStore = SessionStore() // @Observable model
var body: some Scene {
WindowGroup {
ContentView()
.environment(sessionStore)
}
}
}
@Observable // Swift 5.9+
class SessionStore {
var isAuthenticated = false
var userId: String?
}
@Observable (from Observation framework, Swift 5.9+) replaces ObservableObject + @Published. Cleaner, more performant — only re-renders views that read changed properties.
Scene Types
| Scene | Use case |
|---|---|
WindowGroup |
Standard app window (multi-window on iPad/Mac) |
DocumentGroup |
Document-based app (file editor, drawing) |
Settings |
macOS Settings scene (Mac-only) |
MenuBarExtra |
Menu bar item (macOS) |
ImmersiveSpace |
visionOS immersive scene |
@main
struct BHODLApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
#if os(macOS)
Settings {
SettingsView()
}
#endif
}
}
State Management
@State (Local view state)
struct CounterView: View {
@State private var count = 0
var body: some View {
VStack {
Text("Count: \(count)")
Button("Increment") { count += 1 }
}
}
}
@Binding (Two-way reference to state owned elsewhere)
struct ToggleRow: View {
@Binding var isOn: Bool
let title: String
var body: some View {
Toggle(title, isOn: $isOn)
}
}
// Usage
struct SettingsView: View {
@State private var notifications = true
var body: some View {
ToggleRow(isOn: $notifications, title: "Notifications")
}
}
@Observable (Shared model)
@Observable
class WalletStore {
var wallets: [Wallet] = []
var isLoading = false
var error: String?
func load() async {
isLoading = true
defer { isLoading = false }
do {
wallets = try await api.fetchWallets()
} catch {
self.error = error.localizedDescription
}
}
}
struct WalletList: View {
@State private var store = WalletStore()
var body: some View {
List(store.wallets) { wallet in
WalletRow(wallet: wallet)
}
.task { await store.load() }
}
}
@Environment (Dependency injection via env)
// Custom env value
private struct WalletAPIKey: EnvironmentKey {
static let defaultValue: WalletAPI = LiveWalletAPI()
}
extension EnvironmentValues {
var walletAPI: WalletAPI {
get { self[WalletAPIKey.self] }
set { self[WalletAPIKey.self] = newValue }
}
}
// Inject
ContentView()
.environment(\.walletAPI, MockWalletAPI())
// Read
struct WalletList: View {
@Environment(\.walletAPI) var api
// ...
}
// For @Observable types — direct env injection (Swift 5.9+)
@main
struct BHODLApp: App {
@State private var store = WalletStore()
var body: some Scene {
WindowGroup {
ContentView().environment(store)
}
}
}
struct ChildView: View {
@Environment(WalletStore.self) var store
// ...
}
@AppStorage (UserDefaults binding)
struct SettingsView: View {
@AppStorage("theme") var theme: String = "system"
@AppStorage("biometric_enabled") var biometricEnabled: Bool = false
var body: some View {
Form {
Picker("Theme", selection: $theme) {
Text("Light").tag("light")
Text("Dark").tag("dark")
Text("System").tag("system")
}
Toggle("Biometric unlock", isOn: $biometricEnabled)
}
}
}
For App Groups (shared with extensions):
@AppStorage("theme", store: UserDefaults(suiteName: "group.com.bhodl"))
var theme: String = "system"
@SceneStorage (Per-scene state survival)
struct SearchView: View {
@SceneStorage("search_query") var query: String = ""
Установить ios-native в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditВложенные файлы
FAQ
Что делает скилл ios-native?
iOS native platform development with SwiftUI 6.x: app architecture (App protocol, Scene, WindowGroup), navigation (NavigationStack, NavigationSplitView), state (@State, @Binding, @Observable, @Environment), Keychain Services with biometric protection, Secure Enclave (P-256 hardware-isolated keys), App Lifecycle (BGTaskScheduler, Background Modes), Universal Links, App Groups, Share Extensions, Privacy Manifest, StoreKit 2. USE WHEN: user mentions "SwiftUI", "@Observable", "NavigationStack", "@AppStorage", "Keychain Services", "Secure Enclave", "BGTaskScheduler", "Universal Links", "App Groups", "Share Extension", "Privacy Manifest", "StoreKit", "iOS native", "@SceneStorage", "@FocusState" DO NOT USE FOR: Compose Multiplatform on iOS - use `frontend-frameworks/compose-multiplatform` DO NOT USE FOR: Swift language patterns - use `languages/swift` DO NOT USE FOR: Rust ↔ Swift bindings - use `languages/uniffi` DO NOT USE FOR: Cross-platform iOS+Android - use `mobile/kotlin-multiplatform`
Как установить скилл ios-native?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ios-native запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic