Swift / SwiftUI — Overview¶
OWNER: martijn, valentin ALSO_USED_BY: alexander (design integration) LAST_VERIFIED: 2026-03-26 GE_STACK_VERSION: Swift 6.1 / SwiftUI (iOS 26 SDK) / Xcode 26
Overview¶
Swift and SwiftUI are GE's native iOS stack. Every client-facing iOS app is built with SwiftUI — no React Native, no Flutter, no cross-platform. Agents writing iOS code MUST read this section before generating any Swift.
Why Native Over Cross-Platform¶
CHECK: Agent is scoping or building a mobile deliverable. IF: Proposal includes React Native, Flutter, Kotlin Multiplatform, or .NET MAUI. THEN: Reject. GE builds native iOS with Swift/SwiftUI. No exceptions.
Rationale:
- Performance — Native code runs on Metal, no bridge overhead.
- Day-zero API access — New iOS features (Liquid Glass, Foundation Models) available immediately.
- App Store approval — Apple reviews native apps more favourably; cross-platform wrappers trigger extra scrutiny.
- Debugging — Instruments, Memory Graph Debugger, and Xcode Previews work flawlessly with native code.
- Client value — SME clients get enterprise-grade apps, not compromised hybrids.
ANTI_PATTERN: Suggesting React Native "to save time." FIX: Time is saved by reusing GE's SwiftUI component library and architecture patterns, not by switching stacks.
Version Pinning¶
| Component | Version | Notes |
|---|---|---|
| Swift | 6.1 | Strict concurrency checking enabled |
| SwiftUI | iOS 26 SDK | Liquid Glass support required |
| Xcode | 26 | Mandatory from April 28, 2026 for App Store submissions |
| Minimum deployment target | iOS 17 | Covers 95%+ of active devices |
| Swift Package Manager | Built-in | No CocoaPods, no Carthage |
CHECK: Agent is adding a dependency. IF: Dependency uses CocoaPods or Carthage. THEN: Find the SPM-compatible version or reject the dependency.
Project Structure (GE Convention)¶
ProjectName/
App/
ProjectNameApp.swift # @main entry point
ContentView.swift # Root navigation
Features/
{FeatureName}/
Views/
ViewModels/
Models/
Core/
Networking/ # API client, interceptors
Persistence/ # SwiftData models
Extensions/
Components/ # Reusable UI components
Resources/
Assets.xcassets
Localizable.xcstrings
Tests/
UnitTests/
UITests/
CHECK: Agent is creating a new Swift file. IF: File does not fit into the structure above. THEN: Propose a location and get approval from martijn or valentin before creating it.
Swift 6 Strict Concurrency¶
GE enables strict concurrency checking (-strict-concurrency=complete).
All new code MUST compile without concurrency warnings.
CHECK: Agent has written an async function or uses shared mutable state.
IF: Compiler emits a Sendable or actor-isolation warning.
THEN: Fix it. Do NOT suppress with @unchecked Sendable or nonisolated(unsafe).
GE-Specific Conventions¶
- No storyboards, no XIBs — SwiftUI only.
- No Combine for new code — Use async/await and
AsyncSequence. Combine is legacy. - English-only source code — All identifiers, comments, and commit messages in English.
- SwiftLint enforced — Configuration lives in
.swiftlint.ymlat project root. - Accessibility from day one — Every interactive element MUST have an accessibility label.
Cross-References¶
READ_ALSO: wiki/docs/stack/swift-swiftui/architecture.md READ_ALSO: wiki/docs/stack/swift-swiftui/networking.md READ_ALSO: wiki/docs/stack/swift-swiftui/persistence.md READ_ALSO: wiki/docs/stack/swift-swiftui/ui-patterns.md READ_ALSO: wiki/docs/stack/swift-swiftui/distribution.md READ_ALSO: wiki/docs/stack/swift-swiftui/pitfalls.md READ_ALSO: wiki/docs/stack/swift-swiftui/checklist.md