Flutter Embraces Swift Package Manager: What Developers Need to Know for iOS and macOS
The Big Shift: Why Flutter Is Moving Away from CocoaPods
Flutter's upcoming stable release (version 3.44) marks a pivotal change for iOS and macOS app development. Swift Package Manager (SwiftPM) will become the default dependency manager, replacing CocoaPods. This move simplifies the development workflow by eliminating the need for Ruby installations or CocoaPods setup—just one less hurdle to get your app running.
CocoaPods has officially entered maintenance mode, and its registry will become permanently read-only on December 2, 2026. While existing builds will continue to work, no new versions or pods will be added to the trunk after that date. To ensure ongoing dependency updates and access to Apple's Swift package ecosystem, Flutter is transitioning to Swift Package Manager—a solution natively supported by Apple.
If you have already migrated your plugin(s) to SwiftPM, note that there are new requirements explained below for plugin developers.
How App Developers Can Prepare for the Migration
Automatic Migration via Flutter CLI
For app developers, the Flutter command-line interface (CLI) handles the heavy lifting. When you run or build your iOS or macOS app, the CLI automatically updates your Xcode project to use Swift Package Manager. For step-by-step guidance, consult the Flutter migration docs for app developers.
Handling Plugins Without SwiftPM Support
If your app depends on plugins that haven't yet adopted Swift Package Manager, Flutter will emit a warning listing each unsupported dependency. In these cases, Flutter temporarily falls back to CocoaPods for those plugins. However, because CocoaPods support will eventually be removed entirely, if a plugin breaks your build, you should file an issue with the dependency's maintainer requesting Swift package support—or find an alternative package.
Temporary Fallback Option
If SwiftPM causes a critical issue, you can temporarily disable it for your project. Open your pubspec.yaml file, navigate to the flutter section, and set enable-swift-package-manager to false under the config block:
flutter:
config:
enable-swift-package-manager: false
If you opt out, please file a bug report using the Flutter GitHub issue template. Include error details, a list of your plugins and versions, and copies of your Xcode project files to help us resolve the issue before CocoaPods is completely removed.
Plugin Developers: Steps to Adopt Swift Package Manager
If you maintain an iOS or macOS plugin, you must add Swift Package Manager support if you haven't already. Currently, 61% of the top 100 iOS plugins have migrated. The remaining plugins are crucial—app developers shouldn't be forced to rely on a deprecated tool. To encourage adoption, packages without SwiftPM support now receive lower pub.dev scores until they migrate.
Adding Package.swift and Restructuring Source
To add support, create a Package.swift file and restructure your source files to match the standard Swift package layout. This typically involves organizing your code into the expected directory structure (e.g., Sources/YourPlugin/).
New Requirement for Previously Migrated Plugins
If you already migrated your plugin during the 2025 pilot, you must complete one additional step: add FlutterFramework as a dependency in your Package.swift file. For full details, refer to the Flutter migration docs for plugin developers.
What to Do If You Encounter Issues
Migrations can sometimes hit a snag. If SwiftPM causes a breaking problem, you have two options: temporarily opt out (as described above) or file a bug report. Use the Flutter GitHub issue template and provide all necessary details to help the team fix the issue before CocoaPods support is fully removed.
Related Articles
- How to Access and Use Gmail's AI Inbox and Personalized Writing Assistant
- Mastering iOS 26’s Revamped Phone App: A Step-by-Step Guide to Its Best Features
- From Snooze to Success: 5 Alarm Apps That Actually Wake You Up
- Cross-Platform Messaging Just Got Safer: 6 Key Facts About iPhone-Android RCS Encryption
- Migrating from CocoaPods to Swift Package Manager in Flutter: A Step-by-Step Guide
- Flutter’s Shift to Swift Package Manager: What Developers Need to Know
- 5 Surprising Android Auto Upgrades That Changed My Mind
- How TelemetryDeck Leverages Swift for High-Performance Analytics