7 Key Steps for Flutter's Swift Package Manager Transition
Flutter's ecosystem is shifting gears. With the upcoming stable release (version 3.44), Swift Package Manager (SwiftPM) will become the default dependency manager for iOS and macOS apps—marking the end of an era for CocoaPods. This guide breaks down everything you need to know, from the timeline to practical steps for both app and plugin developers. Let's dive into the seven essential points that will help you navigate this transition smoothly.
1. The Big Switch: SwiftPM Takes Over in Flutter 3.44
Starting with Flutter 3.44, every new or existing iOS and macOS project will use Swift Package Manager by default. That means no more wrestling with Ruby installations or managing CocoaPods configurations just to run your app. The Flutter CLI handles the heavy lifting—automatically updating your Xcode project to leverage SwiftPM. For most app developers, this change happens behind the scenes, simplifying your workflow and aligning with Apple’s officially supported tool. If you’re starting a fresh project, you won’t even notice the switch; if you’re updating, the CLI will guide you through the process.
2. CocoaPods Sunset: Mark Your Calendar for December 2, 2026
CocoaPods is officially in maintenance mode. The registry will become read-only on December 2, 2026, meaning no new versions or pods will be published to the trunk after that date. Existing builds will continue to work, but you won’t receive dependency updates or security patches for CocoaPods-based plugins. This timeline gives developers roughly two years to migrate fully. Flutter's shift to SwiftPM ensures you have access to the broader Swift package ecosystem, which is actively maintained by Apple and the open-source community. Waiting until the last minute could leave your projects vulnerable or incompatible.
3. App Developers: Automatic Migration with a Safety Net
For app developers, the migration is largely automatic. When you run flutter run or build your app for iOS or macOS, Flutter’s CLI will convert your Xcode project to use SwiftPM. If any of your dependencies haven’t adopted SwiftPM yet, Flutter prints a warning listing exactly which plugins are unsupported. In that case, the system temporarily falls back to CocoaPods for those specific plugins. This fallback ensures your app still builds, but it’s a temporary measure. CocoaPods support will eventually be removed entirely, so if a plugin you rely on hasn’t migrated, you should file an issue with its maintainer or look for an alternative package.
4. Opting Out Temporarily (If SwiftPM Breaks Something)
Migrations can sometimes hit snags. If SwiftPM causes a breaking issue in your project, you can temporarily disable it. Open your pubspec.yaml file and add the following under the Flutter section:
flutter:
config:
enable-swift-package-manager: false
This reverts to using CocoaPods for that specific build. However, this is not a permanent solution. If you opt out, please file a bug report using the official Flutter GitHub issue template. Include error details, a list of your plugins and versions, and copies of your Xcode project files. Your feedback helps the team resolve issues before CocoaPods is fully deprecated.
5. Plugin Developers: SwiftPM Support Is Now Mandatory
If you maintain a Flutter plugin with iOS or macOS components, you must add Swift Package Manager support—if you haven’t already. Currently, only 61% of the top 100 iOS plugins have migrated. That leaves a significant gap. To encourage adoption, Flutter now lowers the pub.dev score for packages that lack SwiftPM support. This directly impacts your package’s visibility and discoverability. Without migration, app developers relying on your plugin may find themselves stuck with deprecated tooling. The message is clear: migrate now or risk losing relevance.
6. How to Migrate Your Plugin (With New Requirements)
Migrating a plugin to SwiftPM involves adding a Package.swift file and restructuring your source files to match the standard Swift package layout. If you already participated in the 2025 pilot, there’s one new step: you must add FlutterFramework as a dependency in your Package.swift file. This ensures proper integration with Flutter’s runtime. For a detailed walkthrough, refer to the official Flutter migration docs for plugin developers. Don’t forget to test your package with both CocoaPods and SwiftPM to ensure backward compatibility during the transition period.
7. What This Means for Your pub.dev Score and the Future
Your package’s pub.dev score now partially depends on SwiftPM adoption. Packages without SwiftPM support receive a lower score, which affects search ranking and developer trust. This is part of Flutter’s gradual phaseout of CocoaPods. Looking ahead, expect CocoaPods support to be completely removed from Flutter after December 2026. The recommended alternatives are either migrating to SwiftPM or finding a pure-Dart package that serves the same purpose. Start planning now—review your dependencies, update your plugins, and test your builds with SwiftPM enabled. The future of Flutter iOS and macOS development is Swift-first.
This transition doesn’t have to be stressful. By understanding the timeline, leveraging automatic tools, and communicating with plugin maintainers, you can ensure your apps stay up-to-date and performant. Embrace the change—Swift Package Manager brings tighter integration, faster builds, and a more modern development experience. If you hit any roadblocks, the Flutter community and official docs are there to help.