Skip to content

· 11 min read · Nadeera Silva

Mobile

CocoaPods Read-Only: Flutter Swift Package Manager Migration

CocoaPods trunk goes read-only on 2 December 2026. What stops for Flutter iOS apps, and how to move builds and CI to Swift Package Manager.

Hands sliding shut the drawer of a small oak card-catalog box on a desk beside a laptop and a teal mug, a picture of the CocoaPods trunk being closed to new pods.

CocoaPods read-only mode starts on 2 December 2026: from that day the CocoaPods trunk stops accepting new podspecs for good. For a Flutter iOS app, nothing breaks overnight. Existing pods keep installing. What stops is updates: any native SDK that ships only through CocoaPods is frozen at its last published version. Firebase already moved its new releases to Swift Package Manager in October, and Google Mobile Ads stops publishing pods on 2 December. Below I explain what changes, how to move a Flutter iOS project to Swift Package Manager, how to find the plugins that still need CocoaPods, and what to change in GitHub Actions and Codemagic.

Quick answer

After 2 December 2026, pod install still works with pods that are already published, but no new pod versions will appear, so CocoaPods-only dependencies stop getting fixes. Flutter 3.44 and later use Swift Package Manager by default and fall back to CocoaPods only for plugins without a Package.swift. Upgrade Flutter, run the build once so Flutter migrates the Xcode project, find the plugins that still need CocoaPods, replace or upgrade them, then remove CocoaPods from the project and from CI.

What this means for your app or business

  • Your live app is safe. The App Store version keeps working, and your developer can still build it tomorrow.
  • The risk is slow. Each month on frozen pods adds risk. A security fix, or a fix for the next iOS or Xcode release, will not reach a CocoaPods-only build. Firebase already shows this: its CocoaPods line stays on 12.x while new 13.x releases go to Swift Package Manager.
  • Effort. On a typical Flutter app where every plugin supports Swift Package Manager, the switch and a CI update take a few hours plus a TestFlight test. If one plugin has no Swift Package Manager support, add time to replace or fork it.
  • When to get help. Get help if your app uses ads mediation, a payment or analytics SDK that only ships as a pod, or a custom Podfile, or if CI release builds fail after the upgrade.

What exactly stops when CocoaPods goes read-only?

CocoaPods is run by volunteers. In the plan, Orta Therox says that when someone submits a new podspec "it will always be denied at the server level", and the CocoaPods/Specs repo will be archived on GitHub. Concretely:

  • pod trunk push of a new pod or a new version is rejected.
  • pod install and pod update keep working with versions already published. The post says the Specs repo and the CDN "would still operate as long as GitHub and jsDelivr continue to exist".
  • Private spec repos and vendored dependencies are not affected.
WhatAfter 2 Dec 2026Source
New pods or new versions on trunkRejectedCocoaPods blog
pod install with published versionsKeeps workingCocoaPods blog
Firebase Apple SDK on CocoaPodsFrozen on 12.x (12.19.3, 22 Oct 2026); 13.0.0 and later are SwiftPM and binary onlyFirebase release notes
Google Mobile Ads SDK and adapters on CocoaPodsNo new versions after 2 Dec 2026Google Ads Developer Blog, 6 Nov 2026
Flutter's default for iOS pluginsSwift Package Manager since Flutter 3.44 (18 May 2026); latest stable is 3.50.1 (20 Nov 2026)docs.flutter.dev
Flow showing how a Flutter iOS build uses Swift Package Manager for plugins with a Package.swift and falls back to CocoaPods for plugins with only a podspec, with the CocoaPods trunk timeline
How Flutter 3.44 and later choose SwiftPM or CocoaPods per plugin

Why does a Flutter app still use CocoaPods?

Flutter's Swift Package Manager page for app developers says that as of 3.44, Swift Package Manager support "is on by default", and that Flutter "falls back to CocoaPods for dependencies that don't yet support Swift Package Manager". Under the hood, flutter_tools checks each iOS plugin for ios/<plugin>/Package.swift (or darwin/<plugin>/Package.swift for plugins that share macOS code). If only <plugin>.podspec exists, the Podfile stays and pod install runs. Flutter then prints this warning:

The following plugins do not support Swift Package Manager for ios:
  - flutter_inappwebview_ios
This will become an error in a future version of Flutter. Please contact the plugin maintainers to request Swift Package Manager adoption.

So there are three common reasons a project still runs pod install: Flutter is older than 3.44, someone turned Swift Package Manager off, or at least one plugin has no Package.swift. Native pods added by hand to the Podfile (an ads adapter, an SDK added outside Flutter) also keep CocoaPods in the build.

One thing surprised me while checking a test project: FlutterFire's firebase_core 5.2.0 builds against Firebase Apple SDK 13.2.0 through Swift Package Manager, but its podspec is pinned to 12.19.3, the last line Firebase publishes to CocoaPods. Same Dart package, two different native SDKs depending on the dependency manager.

How do I move a Flutter iOS app to Swift Package Manager?

1. Upgrade Flutter and check the setting.

flutter upgrade                # 3.44 or later; 3.50.1 is current stable
flutter config --list | grep swift
# If it shows "false", turn it back on:
flutter config --enable-swift-package-manager

Also check pubspec.yaml. If you see enable-swift-package-manager: false under flutter: config:, remove it or set it to true. The old key disable-swift-package-manager now fails with "The "disable-swift-package-manager" configuration has moved".

flutter:
  config:
    enable-swift-package-manager: true

2. Let Flutter migrate the Xcode project. On a Mac with Xcode 15 or newer (Flutter's minimum), run the app once:

flutter clean
flutter pub get
flutter run        # or: flutter build ios --config-only

Flutter edits ios/Runner.xcodeproj/project.pbxproj and the Runner scheme. It adds the local package FlutterGeneratedPluginSwiftPackage and a "Run Prepare Flutter Framework Script" pre-action. Commit both files. If a plugin needs a higher iOS version, you get "requires minimum platform version 14.0 for the iOS platform, but this target supports 12.0"; raise Minimum Deployments in Xcode and run flutter build ios --config-only.

3. Find the plugins that still need CocoaPods. I wrote a small Dart script that reads .flutter-plugins-dependencies and checks each plugin the same way Flutter does. Save it as tool/spm_check.dart:

// spm_check.dart: list which iOS plugins support Swift Package Manager.
// Run from the Flutter project root after `flutter pub get`:
//   dart run tool/spm_check.dart        (exit code 1 if any plugin is CocoaPods-only)
import 'dart:convert';
import 'dart:io';

void main() {
  final deps = File('.flutter-plugins-dependencies');
  if (!deps.existsSync()) {
    stderr.writeln('Run `flutter pub get` first.');
    exit(2);
  }
  final json = jsonDecode(deps.readAsStringSync()) as Map<String, dynamic>;
  final plugins = (json['plugins']['ios'] as List).cast<Map<String, dynamic>>();
  final podOnly = <String>[];

  for (final p in plugins) {
    final name = p['name'] as String;
    final root = p['path'] as String;
    // Plugins with `sharedDarwinSource: true` keep native code in darwin/, not ios/.
    final pubspec = File('$root/pubspec.yaml').readAsStringSync();
    final dir = RegExp(r'sharedDarwinSource:\s*true').hasMatch(pubspec) ? 'darwin' : 'ios';
    final spm = File('$root/$dir/$name/Package.swift').existsSync();
    final pod = File('$root/$dir/$name.podspec').existsSync();
    final status = spm ? 'SwiftPM' : (pod ? 'CocoaPods only' : 'no native iOS code found');
    final version = root.split('/').where((s) => s.isNotEmpty).last;
    stdout.writeln('${version.padRight(40)} $status');
    if (!spm && pod) podOnly.add(name);
  }

  stdout.writeln('\nSwiftPM enabled in this project: ${json['swift_package_manager_enabled']}');
  if (podOnly.isEmpty) {
    stdout.writeln('All iOS plugins support Swift Package Manager.');
  } else {
    stdout.writeln('Still need CocoaPods: ${podOnly.join(', ')}');
    exit(1);
  }
}

Run it with dart run tool/spm_check.dart. Here is the output from a fresh flutter create app with nine plugins, run on my Linux machine with Flutter 3.47.7:

firebase_core-5.2.0                      SwiftPM
flutter_inappwebview_ios-1.1.2           CocoaPods only
flutter_local_notifications-23.0.4       SwiftPM
google_mlkit_commons-1.0.3               SwiftPM
google_mlkit_text_recognition-1.0.3      SwiftPM
image_cropper-14.0.0                     SwiftPM
package_info_plus-10.2.2                 SwiftPM
permission_handler_apple-9.6.5           SwiftPM
shared_preferences_foundation-2.5.7      SwiftPM
url_launcher_ios-6.4.2                   SwiftPM

SwiftPM enabled in this project: {ios: false, macos: false}
Still need CocoaPods: flutter_inappwebview_ios

It exits with code 1 when a plugin is CocoaPods-only, so it works as a CI gate. The swift_package_manager_enabled line reads false here because that machine runs Linux without Xcode. On a Mac with Xcode 15 or newer it should read true.

4. Deal with each CocoaPods-only plugin. Check for a newer version first (flutter pub outdated). If there is none, look for a maintained alternative or fork the plugin and add a Package.swift using Flutter's plugin author guide. Until then, keep CocoaPods. A mixed build works, but the pod stays frozen.

5. Remove CocoaPods when every plugin is on Swift Package Manager. Move any hand-added pods to Swift packages in Xcode first (Google Mobile Ads and Firebase both publish package URLs). Then:

cd ios
pod deintegrate
rm -rf Podfile Podfile.lock Pods .symlinks
cd ..
# Remove any '#include ... Pods/Target Support Files ...' lines from
# ios/Flutter/Debug.xcconfig and ios/Flutter/Release.xcconfig
flutter clean && flutter pub get && flutter build ios --no-codesign

What changes in GitHub Actions and Codemagic?

Three things: the Xcode version, the cache, and the pod install step.

  • Xcode. Flutter needs Xcode 15 or newer for Swift Package Manager, but Firebase has required Xcode 26.2 since 12.12.0. On GitHub's macos-15 image the default Xcode is still 16.4, so use macos-26 (default Xcode 26.6). Codemagic made Xcode 27.2 its default on 29 November 2026; pin the version you test with.
  • Cache. flutter build ios passes -clonedSourcePackagesDirPath build/ios/SourcePackages to xcodebuild, so cache that folder instead of ios/Pods and ~/Library/Caches/CocoaPods.
  • pod install. Remove explicit pod install or pod repo update steps. When a Podfile is still needed, flutter build runs pod install itself.

GitHub Actions (.github/workflows/ios-build.yml):

name: iOS build
on:
  push:
    branches: [main]
  pull_request:

jobs:
  ios:
    runs-on: macos-26
    steps:
      - uses: actions/checkout@v7

      - name: Show Xcode (macos-26 default is 26.6)
        run: xcodebuild -version

      - uses: subosito/flutter-action@v2
        with:
          channel: stable
          flutter-version: 3.50.1
          cache: true

      - name: Cache Swift packages
        uses: actions/cache@v6
        with:
          path: build/ios/SourcePackages
          key: spm-${{ runner.os }}-${{ hashFiles('pubspec.lock') }}
          restore-keys: spm-${{ runner.os }}-

      - run: flutter pub get

      - name: Fail if any iOS plugin is CocoaPods-only
        run: dart run tool/spm_check.dart

      - name: Build without signing
        run: flutter build ios --release --no-codesign

Codemagic (codemagic.yaml):

workflows:
  ios-spm:
    name: iOS (Swift Package Manager)
    instance_type: mac_mini_m2
    environment:
      flutter: 3.50.1
      xcode: 26.6
    cache:
      cache_paths:
        - $CM_BUILD_DIR/build/ios/SourcePackages
        - $HOME/.pub-cache
    scripts:
      - name: Get packages
        script: flutter pub get
      - name: Check plugins for SwiftPM support
        script: dart run tool/spm_check.dart
      - name: Build
        script: flutter build ios --release --no-codesign

Both files pass a YAML parser, and the workflow passes actionlint 1.7.12. For signing, my guides on GitHub Actions signing certificates and Codemagic provisioning profiles still apply. Swift Package Manager does not change code signing.

How do I verify the migration?

  • In Xcode, open ios/Runner.xcworkspace, build, and check that "Run Prepare Flutter Framework Script" runs as a pre-action and FlutterGeneratedPluginSwiftPackage is a dependency of Runner.
  • dart run tool/spm_check.dart prints "All iOS plugins support Swift Package Manager" and exits 0.
  • ios/Podfile is gone, and the build log no longer shows "Running pod install".
  • A TestFlight build starts cleanly and the features that rely on native SDKs (push, Crashlytics, ads, payments) work.
  • If App Store Connect sends a privacy manifest warning after the switch, check my notes on ITMS-91061 missing privacy manifest.

How do I prevent this from coming back?

  • Keep the check script as a CI step, so a new CocoaPods-only plugin fails the pull request.
  • Before adding a plugin, look for ios/<name>/Package.swift in its repository.
  • Pin Flutter and Xcode versions in CI and upgrade them on purpose.
  • Don't add native SDKs through a Podfile any more. Add them as Swift packages.
  • Leave enable-swift-package-manager alone. Flutter's docs say disabling it "won't be allowed in the future".

Frequently asked questions

When does CocoaPods become read-only?

The CocoaPods plan sets 2 December 2026 as the day trunk permanently stops accepting new podspecs. A test run without new podspecs took place from 2 to 6 November 2026. The announcement does not give a time of day.

Will my iOS app stop building after CocoaPods goes read-only?

No. Pods that are already published keep installing, because the Specs repo and the CDN stay online. What stops is new versions, so CocoaPods-only dependencies no longer get fixes or updates.

Is CocoaPods deprecated in Flutter?

Flutter 3.44, released in May 2026, made Swift Package Manager the default for iOS and macOS and keeps CocoaPods in maintenance mode as a fallback. Flutter prints a warning for plugins without Swift Package Manager support and says it will become an error in a future version.

How do I enable Swift Package Manager in Flutter?

On Flutter 3.44 or later it is on by default. If it was turned off, run flutter config --enable-swift-package-manager, or set enable-swift-package-manager to true under flutter, config in pubspec.yaml, then run the app once so Flutter migrates the Xcode project.

Can I disable Swift Package Manager in Flutter?

You can still set enable-swift-package-manager to false in pubspec.yaml or run flutter config --no-enable-swift-package-manager. Flutter's docs advise against it and say disabling it won't be allowed in the future.

Does Firebase still publish to CocoaPods?

No new major versions. Firebase 12.19.0 was its final scheduled CocoaPods release, a 12.19.3 security update followed on 22 October 2026, and Firebase 13.0.0 and later ship only through Swift Package Manager and binary downloads.

How do I know which Flutter plugins still need CocoaPods?

Check each iOS plugin for a Package.swift file in ios/plugin_name or darwin/plugin_name. Plugins with only a podspec still need CocoaPods, and Flutter lists them in a build warning that starts with The following plugins do not support Swift Package Manager.

Sources

  1. CocoaPods Trunk Read-only Plan (updated May 2025) (CocoaPods Blog, 2024-11-30)
  2. Swift Package Manager for app developers (Flutter)
  3. Swift Package Manager for plugin authors (Flutter)
  4. Flutter 3.44.0 release notes (Flutter, 2026-05-18)
  5. Flutter 3.50.0 release notes (Flutter, 2026-11-11)
  6. Add Swift Package Manager compatibility (tracking issue #126005) (GitHub flutter/flutter)
  7. flutter_tools darwin_dependency_management.dart (3.50.1) (GitHub flutter/flutter)
  8. Prepare for CocoaPods read-only mode: Migrate your iOS apps to Swift Package Manager (Google Ads Developer Blog, 2026-11-06)
  9. Migrate from CocoaPods (Firebase, 2026-11-19)
  10. Firebase Apple SDK release notes (Firebase)
  11. Options to install Firebase in your Apple app (Firebase, 2026-11-19)
  12. firebase_core changelog (pub.dev, 2026-11-16)
  13. macOS 26 arm64 runner image (GitHub actions/runner-images)
  14. macOS 15 arm64 runner image (GitHub actions/runner-images)
  15. What's new: Xcode 27.2 will be default starting November 29 (Codemagic)
  16. Codemagic YAML getting started (Codemagic)
  17. Post by @orta.io on the CocoaPods read-only test run (Bluesky (Orta Therox), 2026-11-02)
SharePost on XLinkedIn

Comments

Share a question or note about this article.

Loading comments…

CocoaPods Read-Only Dec 2 2026: Move Flutter iOS to SwiftPM | Nadeera Silva