ワンクリックで
flutter-spm
Guide for integrating, configuring, and caching dependencies using Swift Package Manager (SPM) in Flutter iOS/macOS applications.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide for integrating, configuring, and caching dependencies using Swift Package Manager (SPM) in Flutter iOS/macOS applications.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit and rewrite project changelogs to adhere strictly to Keep a Changelog and Semantic Versioning standards. Use when reviewing, drafting, or refining project changelogs.
Guide for utilizing the Genkit Dart SDK to build full-stack, AI-powered agentic applications.
Guide for utilizing Dart 3.0+ up to 3.12 syntax updates (private named parameters, extension types, records, pattern matching, wildcard variables, and primary constructors).
Optimize Dart code for performance, type safety, and runtime error prevention. Use when profiling hot paths, enforcing sound typing, handling null safety, or debugging type mismatches and runtime failures.
Run Dart tooling workflows for static analysis, dependency conflict resolution, and test migration to package:checks. Use when fixing analyzer errors, resolving pub dependency conflicts, or modernizing test assertions.
Configure and run integration tests using the integration_test package with Flutter Driver. Use when testing complete user flows, verifying navigation, or running end-to-end tests on devices or CI.
| name | flutter-spm |
| description | Guide for integrating, configuring, and caching dependencies using Swift Package Manager (SPM) in Flutter iOS/macOS applications. |
| metadata | {"platforms":"flutter, ios, macOS","languages":"swift, dart","category":"platform"} |
Introduced in Flutter 3.44
Swift Package Manager is the default dependency manager for iOS and macOS applications in Flutter, replacing CocoaPods. This modern integration improves compilation speeds and simplifies native package dependency trees.
In Flutter 3.44+, newly generated iOS and macOS platforms are configured to use SPM out of the box.
Podfile or Podfile.lock: The iOS directory no longer requires CocoaPods.pubspec.yaml or Package.swift files, which Flutter automatically integrates into the runner target.To add a native package directly to the iOS Runner:
ios/Runner.xcworkspace in Xcode.https://github.com/Alamofire/Alamofire) and select target version.Runner target.To define an SPM dependency for a Flutter plugin, use the swift_packages field in pubspec.yaml:
flutter:
plugin:
platforms:
ios:
pluginClass: MyPlugin
swift_packages:
- name: Alamofire
url: https://github.com/Alamofire/Alamofire.git
version: 5.9.0
SPM dependencies are stored outside the project workspace. To optimize CI build times (e.g., in GitHub Actions), cache the following directories:
~/Library/Caches/org.swift.swiftpm~/Library/Developer/Xcode/DerivedData- name: Cache Swift Package Manager Dependencies
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-spm-${{ hashFiles('**/pubspec.yaml', 'ios/Runner.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-spm-
If SPM dependencies fail to resolve during CLI builds:
# 1. Clean the project
flutter clean
# 2. Resolve package dependencies manually via Xcode CLI
xcodebuild -resolvePackageDependencies -workspace ios/Runner.xcworkspace -scheme Runner
If multiple plugins request incompatible versions of the same Swift Package: