capacitor-app-spm-migration
БесплатноБез исполняемых скриптовНе проверенGuides the agent through migrating an existing Capacitor app project from CocoaPods to Swift Package Manager (SPM) for iOS dependency management. Covers…
от capawesome-team★ 56 звёзд на GitHubОб этом скилле
Capacitor App: CocoaPods → SPM Migration
Migrate an existing Capacitor app project's iOS dependency management from CocoaPods to Swift Package Manager (SPM). The migration is destructive — the existing ios/ folder is deleted and re-scaffolded, then user-authored files are restored from a temporary backup.
Prerequisites
| Requirement | Version |
|---|---|
| Capacitor | 6+ |
| Node.js | 18+ |
| Xcode | 15+ |
| CocoaPods | installed (only used for verification before deletion) |
The project must be a Capacitor app (not a plugin) and must currently use CocoaPods (ios/App/Podfile exists).
Procedures
Step 1: Verify Project State
- Verify the project is a Capacitor app, not a plugin. Confirm
package.jsonlists@capacitor/iosindependenciesand the project root contains acapacitor.config.*file. - Verify the project currently uses CocoaPods. The file
ios/App/Podfilemust exist. If it does not exist andios/App/CapApp-SPM/Package.swiftexists, the project is already on SPM — abort and inform the user. - Read
@capacitor/coreversion frompackage.json(dependenciesordevDependencies). Confirm the major version is 6 or higher. If lower, abort and direct the user to thecapacitor-app-upgradesskill first. - Verify the working tree is clean. Run
git status --porcelain— if the output is non-empty, instruct the user to commit or stash changes before proceeding. The migration is destructive and must be reversible viagit checkout.
Step 2: Inventory Installed Capacitor Plugins
Read package.json and record every installed Capacitor plugin under dependencies. Match these prefixes:
@capacitor/*(official plugins)@capawesome/*and@capawesome-team/*@capacitor-community/*@capacitor-firebase/*@capacitor-mlkit/*@revenuecat/*- Any other package with
"capacitor"in itspackage.jsonkeywordsarray
Record each plugin's package name and installed version. This list is used in Step 8 to verify all plugins resolve under SPM after re-sync.
Step 3: Identify Files to Preserve
Build a checklist of files in ios/ that contain user-authored content and must survive the re-scaffold. For each path below, check whether the file exists. Record only the paths that exist.
| Path (relative to project root) | Purpose |
|---|---|
ios/App/App/Info.plist |
App permissions, URL schemes, bundle config, custom keys |
ios/App/App/AppDelegate.swift |
Custom app lifecycle code |
ios/App/App/SceneDelegate.swift |
Custom scene lifecycle code (if present) |
ios/App/App/Assets.xcassets/ |
App icon, splash assets, color sets |
ios/App/App/Base.lproj/ |
LaunchScreen and Main storyboards |
ios/App/App/App.entitlements |
Push, App Groups, Associated Domains, Keychain Sharing |
ios/App/App/GoogleService-Info.plist |
Firebase configuration (if Firebase plugins are installed) |
ios/App/App/*.xcconfig |
Build configuration overrides |
ios/App/App.xcodeproj/project.pbxproj |
Source for extracting signing values in Step 5 |
Additionally, scan ios/App/App/ for any other .swift files beyond AppDelegate.swift and SceneDelegate.swift. These are user-authored Swift sources (e.g., custom Notification Service Extensions, custom view controllers) and must also be preserved.
If the project contains a Notification Service Extension or other Xcode targets under ios/App/ (e.g., ios/App/NotificationService/), record those directories as well.
Step 4: Back Up Preserved Files
Create the backup directory:
mkdir -p .spm-migration-backupAdd
.spm-migration-backup/to.gitignoreto prevent accidental commits:# iOS files +.spm-migration-backup/Copy each file recorded in Step 3 into
.spm-migration-backup/, preserving the relative path. For example:mkdir -p .spm-migration-backup/ios/App/App cp ios/App/App/Info.plist .spm-migration-backup/ios/App/App/Info.plist cp ios/App/App/AppDelegate.swift .spm-migration-backup/ios/App/App/AppDelegate.swift cp -R ios/App/App/Assets.xcassets .spm-migration-backup/ios/App/App/Assets.xcassets cp -R ios/App/App/Base.lproj .spm-migration-backup/ios/App/App/Base.lprojRepeat for every file/directory identified in Step 3. Use
cp -Rfor directories.Always copy the full
ios/App/App.xcodeproj/project.pbxprojto.spm-migration-backup/ios/App/App.xcodeproj/project.pbxproj, even though the file itself will not be restored. Step 5 reads it to extract signing values, and Step 11 may reference it for capability reconfiguration.
Step 5: Extract Signing & Bundle Configuration
Read .spm-migration-backup/ios/App/App.xcodeproj/project.pbxproj and extract the values of the following build settings from the App target's XCBuildConfiguration blocks (both Debug and Release). Search for each ke
Установить capacitor-app-spm-migration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл capacitor-app-spm-migration?
Guides the agent through migrating an existing Capacitor app project from CocoaPods to Swift Package Manager (SPM) for iOS dependency management. Covers prerequisite checks, inventorying installed Capacitor plugins, backing up customized iOS project files (Info.plist, AppDelegate.swift, Assets.xcassets, Base.lproj, App.entitlements, GoogleService-Info.plist, .xcconfig files, signing configuration), deleting the existing `ios/` folder, re-scaffolding with `npx cap add ios --packagemanager SPM`, restoring preserved files, re-syncing plugins, and verifying the build. Performs all migration steps manually — does not use the interactive `npx cap spm-migration-assistant` command. Do not use for Capacitor plugin projects, app projects already on SPM, app projects without an existing `ios/` folder, or non-Capacitor mobile frameworks.
Как установить скилл capacitor-app-spm-migration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-app-spm-migration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic