Swift is the primary language for Apple’s platforms—each shares core Swift syntax but adds platform-specific frameworks and lifecycle patterns you explore locally in Xcode.
Platform overview
- iOS / iPadOS — touch UI, App Store distribution, SwiftUI or UIKit
- macOS — desktop apps, menu bar, AppKit or SwiftUI
- watchOS — complications, glanceable UI, WatchKit
- tvOS — focus-driven TV interfaces
Shared Swift, platform SDKs
Business logic and models can live in Swift packages shared across targets. UI layers differ—SwiftUI abstracts much of this when you adopt it locally. The playground stays language-only without SDK imports.
Important interview questions and answers
- Q: Can one Swift package target multiple Apple OSes?
A: Yes—SPM supports multi-platform targets with conditional compilation (#if os(iOS)). - Q: UIKit vs SwiftUI?
A: UIKit is imperative and mature; SwiftUI is declarative and Apple’s modern UI direction—many apps mix both during migration.
Self-check
- Name two Apple platforms Swift targets.
- What tool do most Swift developers use for full app builds?
Tip: Shared Swift packages can target multiple Apple OSes with #if os(iOS) conditionals locally.
Interview prep
- Shared Swift packages?
Yes—SPM supports multi-platform targets with conditional compilation per OS.
- UIKit vs SwiftUI?
UIKit is imperative and mature; SwiftUI is declarative and Apple modern direction—many apps mix both.