Xshell Pro
📖 Tutorial

Flutter Embraces Swift Package Manager: The End of CocoaPods Dependency

Last updated: 2026-05-06 17:27:57 Intermediate
Complete guide
Follow along with this comprehensive guide

The Flutter ecosystem is undergoing a significant transition. Starting with the upcoming stable release 3.44, Swift Package Manager (SwiftPM) will become the default dependency manager for iOS and macOS applications. This move effectively retires CocoaPods, a tool that has been a staple in Apple development but is now officially in maintenance mode. Developers can expect a smoother setup process, eliminating the need to manage Ruby installations or CocoaPods configurations.

Timeline and What’s Changing

CocoaPods will not disappear overnight, but its end is approaching. The CocoaPods registry will become permanently read-only on December 2, 2026. After that date, no new versions or pods will be added. While existing builds with Flutter will continue to work, the platform will no longer support dynamic dependency updates from CocoaPods. To ensure ongoing compatibility and access to the Swift package ecosystem, Flutter is aligning with Apple’s supported solution.

Flutter Embraces Swift Package Manager: The End of CocoaPods Dependency

What App Developers Need to Know

For most app developers, the migration is handled automatically by the Flutter CLI. Whenever you run or build your iOS or macOS app, the CLI will update your Xcode project to use SwiftPM. For detailed steps, consult the Flutter migration documentation for app developers.

Handling Unsupported Plugins

If your project depends on plugins that haven’t yet adopted SwiftPM, Flutter will display a warning and temporarily fall back to CocoaPods for those plugins. However, because CocoaPods support will eventually be removed entirely, you may encounter build failures. In such cases, you should either file an issue with the plugin maintainer requesting SwiftPM support or consider an alternative package.

Opting Out Temporarily

If SwiftPM causes a breaking issue in your project, you can disable it as a temporary measure. Open your pubspec.yaml file, locate 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 report the issue 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 the team resolve problems before CocoaPods support is phased out completely.

Guidance for Plugin Developers

Plugin authors who maintain iOS or macOS packages must add SwiftPM support if they haven’t already. According to Flutter team metrics, 61% of the top 100 iOS plugins have already migrated. The remaining 39% are critical to ensure app developers are not forced to rely on a deprecated tool.

How to Add SwiftPM Support

To migrate your plugin, you need to add a Package.swift file and restructure your source files to match the standard Swift package layout. If you already migrated during the 2025 pilot, take note: you must now add FlutterFramework as a dependency in your Package.swift. Refer to the Flutter migration documentation for plugin developers.

Impact on pub.dev Scores

To encourage migration, packages without SwiftPM support now receive lower pub.dev scores. This scoring adjustment will continue until the package is compliant. The message is clear: adopt SwiftPM to maintain visibility and trust in the Flutter community.

Migration Documentation

For comprehensive guidance, refer to the official Flutter migration docs:

Conclusion

The transition to SwiftPM marks a cleaner, more modern dependency management approach for Flutter’s iOS and macOS targets. By automating the migration for app developers and incentivizing plugin authors, Flutter ensures a smoother path forward. Start planning your migration today to avoid being caught off guard when CocoaPods support ends.