Flutter's Migration to Swift Package Manager: Key Changes and How to Adapt
Starting with Flutter 3.44, Swift Package Manager (SPM) becomes the default dependency manager for iOS and macOS apps, replacing CocoaPods. This change simplifies setup by eliminating Ruby and CocoaPods installations. CocoaPods will enter read-only mode in December 2026, so migrating to SPM is essential for ongoing support. Below, we answer common questions about the transition and what app and plugin developers need to do.
What exactly is changing in Flutter 3.44?
Flutter 3.44 makes Swift Package Manager (SPM) the default dependency manager for iOS and macOS targets. Previously, CocoaPods was required to manage native dependencies. Now, when you build or run your Flutter app on Apple platforms, the CLI automatically configures your Xcode project to use SPM. This eliminates the need to install CocoaPods via Ruby. Existing projects using CocoaPods will still work for a time, but new projects will default to SPM. Over time, Flutter will fully drop CocoaPods support, so the migration is strongly encouraged.
Why is Flutter moving away from CocoaPods?
CocoaPods is officially in maintenance mode, and its registry will become read-only on December 2, 2026. After that date, no new pods or updates can be published. To ensure Flutter apps can still receive dependency updates and access Apple's ecosystem, Flutter is transitioning to Apple's own Swift Package Manager. SPM is natively supported by Xcode, requires no additional runtime, and offers better performance and integration. This change also reduces friction for developers who previously had to manage Ruby versions and Gem installations just to get a Flutter app running on iOS or macOS.
How does this affect me as an app developer?
For app developers, the migration is handled automatically by the Flutter CLI. When you run flutter build ios or flutter run, the CLI will update your Xcode project to use SPM. You don't need to manually adjust Podfile or install CocoaPods. However, if your app depends on plugins that haven't adopted SPM yet, Flutter will print a warning listing those unsupported dependencies. In that case, Flutter temporarily falls back to CocoaPods for those specific plugins. This ensures your builds still work while you wait for plugin updates. Eventually, CocoaPods fallback will be removed, so it's important to encourage plugin maintainers to migrate.
What if my plugins don't support Swift Package Manager yet?
If you see a warning about unsupported plugins, Flutter will still attempt to build using a CocoaPods fallback for those dependencies. This fallback is temporary and will be removed in a future release. To resolve the issue, check if the plugin maintainer has an SPM‑compatible version (often indicated by a Package.swift file). If the plugin has not migrated, you can file an issue with the maintainer requesting SPM support. Alternatively, look for a different package that already supports SPM. Until the ecosystem catches up, your builds will work, but you risk breakage when CocoaPods is completely removed.
How can I temporarily revert to CocoaPods if SPM causes problems?
If Swift Package Manager introduces a breaking issue in your project, you can temporarily disable it. Open your pubspec.yaml file, go to the flutter section, and under the config block, set enable-swift-package-manager: false:
flutter:
config:
enable-swift-package-manager: false
This reverts your project to using CocoaPods for iOS/macOS dependencies. Please note that this is a temporary workaround. If you opt out, it's strongly recommended to file a bug report on the Flutter GitHub repository with details about the error, your plugin list, versions, and Xcode project files. This helps the Flutter team fix issues before CocoaPods support is fully removed.
What do plugin developers need to do?
Plugin maintainers must add SPM support to their iOS/macOS plugins if they haven't already. Currently, only 61% of the top 100 iOS plugins have migrated. The remaining 39% risk losing pub.dev scores and eventually breaking app builds. To add SPM support, create a Package.swift file and structure your source files according to the standard Swift package layout. If you already migrated during the 2025 pilot, you have one additional step: you must add FlutterFramework as a dependency in Package.swift. Refer to the official Flutter migration docs for detailed instructions. Migrating now ensures your plugin stays compatible and avoids lower scores on pub.dev.
What is the timeline for CocoaPods deprecation?
CocoaPods will become read-only on December 2, 2026. After that, no new versions or pods can be added to the registry, though existing builds will continue to function. Flutter will gradually phase out CocoaPods support in subsequent releases. The first step is making SPM the default in Flutter 3.44. In future releases, the CocoaPods fallback for plugins will be removed entirely. This timeline gives plugin developers about two years to migrate. Meanwhile, Flutter will use a scoring system on pub.dev to encourage migration: packages without SPM support receive lower scores. The goal is a smooth transition before CocoaPods becomes completely unavailable.