cross-platform

Installation
SKILL.md

Cross-Platform: macOS ↔ iOS

Patterns for sharing code between macOS and iOS, building iOS-specific extensions, and syncing data across platforms.

Critical Constraints

  • ❌ Never import AppKit or UIKit in shared code — use SwiftUI types and #if os() for platform-specific imports
  • ❌ Never use NSColor/UIColor directly in shared views — use SwiftUI Color
  • ❌ Never use NSFont/UIFont directly — use SwiftUI .font()
  • ✅ Abstract platform services behind protocols
  • ✅ Use #if os(macOS) / #if os(iOS) for platform-specific implementations
  • ✅ Use @Environment(\.horizontalSizeClass) for adaptive layouts within a platform

Project Structure

Related skills

More from makgunay/claude-swift-skills

Installs
8
First Seen
Feb 14, 2026