Flutter's Shift to Swift Package Manager: What Developers Need to Know
Introduction
Starting with Flutter 3.44, Swift Package Manager (SwiftPM) becomes the default dependency manager for iOS and macOS apps, replacing CocoaPods. This move streamlines project setup by eliminating the need for Ruby or CocoaPods installations. CocoaPods is now in maintenance mode, and its registry will become read-only on December 2, 2026, meaning no new versions or pods will be added after that date. To ensure continued dependency updates and access to the Swift package ecosystem, Flutter is adopting Apple’s native solution.
Understanding the Transition
The decision to switch to SwiftPM stems from CocoaPods’ gradual deprecation. While existing builds will remain functional, the Flutter team has decided to align with Apple’s supported dependency management system. This change affects both app developers and plugin authors, with clear migration paths for each group.
What App Developers Should Do
Automatic Migration via Flutter CLI
The Flutter CLI handles the migration transparently. When you run or build your iOS or macOS app, the tool automatically updates your Xcode project to use Swift Package Manager. For detailed steps, refer to the Flutter migration docs fo app developers.
Handling Unsupported Plugins
If your app relies on plugins that haven’t adopted SwiftPM yet, Flutter will print a warning listing those unsupported dependencies. The system will temporarily fall back to CocoaPods for those plugins, but because CocoaPods support will eventually be removed entirely, you should file an issue with the plugin maintainer or seek alternatives if a build breaks.
Opting Out Temporarily
If SwiftPM causes a breaking issue, you can temporarily disable it in your pubspec.yaml file by setting enable-swift-package-manager to false under the flutter section:
flutter:
config:
enable-swift-package-manager: falseIf you opt out, please report the issue using the Flutter GitHub issue template and include error details, a list of your plugins and versions, and copies of your Xcode project files.
Guidance for Plugin Developers
Migration Requirements
Plugin authors must add Swift Package Manager support if they haven’t already. Currently, 61% of the top 100 iOS plugins have migrated. The remaining plugins need to adopt SwiftPM to avoid reliance on a deprecated tool. To add support, you must create a Package.swift file and rearrange source files to match the standard Swift package structure. If you migrated during the 2025 pilot, add FlutterFramework as a dependency in your Package.swift. See the Flutter migration docs for plugin developers for complete instructions.
Impact on pub.dev Scores
Packages without Swift Package Manager support now receive lower scores on pub.dev until they migrate. This encourages adoption and ensures that app developers can use packages without compatibility issues.
Conclusion and Next Steps
The transition to Swift Package Manager marks a significant step forward for Flutter’s iOS and macOS development. App developers benefit from a cleaner setup, while plugin authors are urged to migrate to maintain scoring and compatibility. As CocoaPods support phases out entirely, staying up to date with SwiftPM will ensure a smooth development experience. For more details, explore the official migration guides linked above.
Note: Internal anchor links are referenced as #app-migration-docs, #bug-report, and #plugin-migration-docs.
Related Articles
- How DoorDash Modernized Its iOS Testing with Copilot and Swift Testing
- Apple's Strategic Delay of iPhone 18 Revealed: Leaker Details Market-Driven Pause
- Adidas 'Supershoe' Shatters Marathon Records as Sawe Breaks Two-Hour Barrier in London
- 5 Things You Need to Know About Nothing's Latest Pokémon Teaser and the Ear Open
- React Native 0.84: Boosted Performance with Hermes V1 and Streamlined Builds
- Unlocking the Hidden Power of Google’s Circle to Search: The Feature Google Doesn’t Talk About
- From Snooze to Success: 5 Alarm Apps That Actually Wake You Up
- Building a Scalable Analytics Service with Swift: TelemetryDeck's Journey