A guide for migrating existing code and handling breaking changes accompanying version upgrades.
Directory Structure
swift-ios-migration/
├── SKILL.md (このファイル)
└── references/
├── ios17-observable.md # @Observable移行パターン
├── swift6-concurrency.md # Swift 6並行処理対応
├── swift62-changes.md # Swift 6.2 / Xcode 26
└── ipados26-windowing.md # iPadOS 26ウィンドウシステム
Reference Files
references/ios17-observable.md
Guide to migrating to the iOS 17+ @Observable macro:
- Migration Patterns: ObservableObject → @Observable
- @Bindable: Alternatives to @Published/@Binding
- @Environment Changes: New ways to pass environment values
- Performance Improvements: Per-property observation
- Notes: Compatibility, coexistence with existing code
references/swift6-concurrency.md
Swift 6 Concurrency Support Guide:
- @MainActor: Application to the entire ViewModel, UI protection
- Sendable: Data model design, actor boundaries
- Migration Checklist: Enabling Strict Concurrency Checking
- Common Warnings and Solutions:
- "Non-sendable type captured"
- "Actor-isolated property cannot be mutated"
- Actor: Guaranteeing thread safety with custom Actors
references/swift62-changes.md
Swift 6.2 / Xcode 26 Migration Guide:
- Approachable Concurrency: More approachable concurrency
- Default Actor Isolation: Making MainActor the default
- @concurrent: Explicit background execution
- New Xcode 26 Features: AI Coding Tools, Playground enhancements
- Debugging Improvements: LLDB enhancements, concurrency debugging
references/ipados26-windowing.md
iPadOS 26 Window System Migration Guide:
- Deprecation of UIRequiresFullScreen: Removal from Info.plist, Auto Layout support
- Scene Geometry: UIWindowScene.Geometry, effectiveGeometry, resize detection
- Size Restrictions: UISceneSizeRestrictions, minimumSize/maximumSize settings
- Orientation Lock: prefersInterfaceOrientationLocked, orientation change monitoring
- Menu Bar Support: SwiftUI Commands, UIMenuBuilder, keyboard shortcuts
- Multi-window: UIApplicationSupportsMultipleScenes, creating new windows
- Trait Collection: Size class support, automatic tracking
Usage
When migrating to iOS 17 @Observable
references/ios17-observable.mdcheck the migration patterns with- Start using
@Observablein new code - Migrate gradually starting from small existing ViewModels
- Migrate large ViewModels with caution
When migrating to Swift 6
references/swift6-concurrency.mdcheck the checklist with- Enable Strict Concurrency Checking
- ViewModelに
@MainActorAdd - Make the data model
Sendablecompatible with - Resolve warnings one by one
When migrating to Swift 6.2
references/swift62-changes.mdcheck the new features with- Update to Xcode 26
- Enable Approachable Concurrency
- Set Default Actor Isolation to MainActor
- Where necessary,
@concurrentadd - Simplify existing Swift 6 code
When supporting the iPadOS 26 window system
references/ipados26-windowing.mdCheck the migration checklist withUIRequiresFullScreenRemove from Info.plist- Implement size-adaptive layout with Auto Layout
UISceneSizeRestrictionsSet the minimum size with- Menu bar support (when using an external keyboard)
Migration priority
Swift 6.2 (recommended order)
- Enable Approachable Concurrency in Build Settings
- Set Default Actor Isolation to MainActor
- Add
@concurrentwhere necessary - Simplify existing Swift 6 code
Swift 6 (recommended order)
- ViewModelに
@MainActorAdd - Make the data model
Sendablecompatible with - Unify asynchronous processing
async/awaitto
iOS 17 @Observable (recommended order)
- Use
@Observablein new code - Migrate from small existing ViewModels
- Migrate large ViewModels carefully
iPadOS 26 (recommended order)
- Build and test with Xcode 26
- Remove UIRequiresFullScreen
- Verify Auto Layout support
- Implement the menu bar
Version compatibility table
| Feature | Swift 5.9 | Swift 6 | Swift 6.2 |
|---|---|---|---|
| Strict Concurrency | Opt-in | Default | Default |
| @MainActor | ✅ | ✅ | ✅ |
| Default Actor Isolation | - | - | ✅ |
| @concurrent | - | - | ✅ |
| Approachable Concurrency | - | - | ✅ |
| Feature | iOS 16 | iOS 17 | iOS 18 | iOS 26 |
|---|---|---|---|---|
| @Observable | - | ✅ | ✅ | ✅ |
| iPadOS new window system | - | - | - | ✅ |
Related skills
- swiftui-components: UI component catalog
- swiftui-coding-guidelines: Basic best practices
- swiftui-ssot: State management design
- swiftui-accessibility: Accessibility implementation