rshankras/migration-patterns
Migration guides for CoreData to SwiftData, UIKit to SwiftUI, ObservableObject to @Observable, XCTest to Swift Testing, Objective-C to Swift, and StoreKit 1 to StoreKit 2. Use when migrating between Apple framework generations.
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill migration-patterns
Comprehensive guides for migrating between Apple framework generations. Each guide covers the full before/after mapping, coexistence strategies, and common pitfalls.
What are you migrating?
|
+-- Data persistence layer
| +-- CoreData --> SwiftData
| | See coredata-to-swiftdata.md
| | Min: iOS 17 / macOS 14
| |
| +-- Still need CoreData features SwiftData lacks?
| Stay on CoreData or use coexistence mode
|
+-- UI framework
| +-- UIKit --> SwiftUI
| | See uikit-to-swiftui.md
| | Min: iOS 13 (basic), iOS 16+ (modern navigation)
| |
| +-- Full rewrite or incremental?
| Incremental is almost always better -- adopt screen by screen
|
+-- State management / observation
| +-- ObservableObject --> @Observable
| | See observable-migration.md
| | Min: iOS 17 / macOS 14
| |
| +-- Combine publishers --> AsyncSequence
| Also covered in observable-migration.md
|
+-- Programming language
| +-- Objective-C --> Swift
| | See objc-to-swift.md
| | Incremental: migrate leaves first, trunks last
| |
| +-- Mixed-language project?
| Both languages coexist via bridging headers
|
+-- In-app purchases
| +-- StoreKit 1 --> StoreKit 2
| | See storekit-migration.md
| | Min: iOS 15
| |
| +-- Using a third-party SDK (RevenueCat, etc.)?
| Check if SDK already supports StoreKit 2 internally
|
+-- Testing framework
+-- XCTest --> Swift Testing
See xctest-to-swift-testing.md
Min: Xcode 16 / Swift 6.0
| Migration | Reference File | Minimum OS | Risk Level |
|-----------|---------------|------------|------------|
| CoreData to SwiftData | coredata-to-swiftdata.md | iOS 17 / macOS 14 | High (data layer) |
| UIKit to SwiftUI | uikit-to-swiftui.md | iOS 13+ | Medium (incremental) |
| ObservableObject to @Observable | observable-migration.md | iOS 17 / macOS 14 | Low-Medium |
| Objective-C to Swift | objc-to-swift.md | Any | Medium (incremental) |
| StoreKit 1 to StoreKit 2 | storekit-migration.md | iOS 15 | Medium-High (payments) |
| XCTest to Swift Testing | xctest-to-swift-testing.md | Xcode 16 | Low |
Before starting, determine:
Based on the migration type, read from this directory:
coredata-to-swiftdata.md -- NSManagedObject to @Model, migration stages, coexistenceuikit-to-swiftui.md -- UIHostingController, Representable, incremental adoptionobservable-migration.md -- @Observable macro, @Environment injection, AsyncSequenceobjc-to-swift.md -- Bridging headers, @objc, incremental file-by-file migrationstorekit-migration.md -- StoreKit 2 async/await purchases, Transaction.currentEntitlements, JWSxctest-to-swift-testing.md -- @Test, #expect, #require, parameterized testsScan for old-framework patterns and map each to its modern equivalent using the reference file. Check for:
For each migration, decide between:
Take rshankras/migration-patterns from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.