From 8206cfb33ed1f3f608434820ffa4a4961423a0c4 Mon Sep 17 00:00:00 2001 From: "Shams Zakhour (ignore Sfshaza)" Date: Thu, 20 Aug 2026 16:16:43 -0700 Subject: [PATCH 1/4] Add section on removing CocoaPods from a project --- .../for-app-developers.md | 63 ++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md index 3d7a5077fe..a28c4214ee 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md @@ -39,8 +39,66 @@ yet support Swift Package Manager. If you previously disabled SwiftPM, you might need to enable it with `flutter config --enable-swift-package-manager`. -If automatic migration works for you, that's it! -You are done with this page. +If automatic migration works for you and all of your dependencies +support Swift Package Manager, +you can [remove CocoaPods integration][removeCocoaPods]. + +## How to remove CocoaPods integration + +When all Flutter plugins in your project support Swift Package Manager, +you can remove CocoaPods integration completely from your project. + +:::note +Flutter falls back to CocoaPods if any of your project dependencies +do not support Swift Package Manager. +Ensure that all plugins in your project support Swift Package Manager +before removing CocoaPods. +::: + +To remove CocoaPods from your project: + +1. De-integrate CocoaPods from your Xcode projects: + + * For iOS projects, run: + + ```sh + cd ios + pod deintegrate + cd .. + ``` + + * For macOS projects, run: + + ```sh + cd macos + pod deintegrate + cd .. + ``` + +1. Delete CocoaPods-related files and directories: + + * For iOS, delete `ios/Podfile`, `ios/Podfile.lock`, + the `ios/Pods/` directory, and + the `ios/.symlinks/` directory (if present). + + * For macOS, delete `macos/Podfile`, `macos/Podfile.lock`, + the `macos/Pods/` directory, and + the `macos/.symlinks/` directory (if present). + +1. Check your configuration files: + + In `ios/Flutter/Debug.xcconfig` and `ios/Flutter/Release.xcconfig` + (and macOS equivalents under `macos/Flutter/`), + remove any `#include` lines referencing `Pods/Target Support Files` + or CocoaPods `.xcconfig` files if they are still present. + +1. Clean and build your project to verify the migration: + + ```sh + flutter clean + flutter pub get + flutter run + ``` ## How to add Swift Package Manager integration manually @@ -223,4 +281,5 @@ This turns off Swift Package Manager for the current user. If a project is incompatible with Swift Package Manager, all contributors need to run this command. +[removeCocoaPods]: #how-to-remove-cocoapods-integration [removeSPM]: #how-to-remove-swift-package-manager-integration From 1fb3934cc3bfbb34a247a0e654c83baba85654be Mon Sep 17 00:00:00 2001 From: "Shams Zakhour (ignore Sfshaza)" Date: Thu, 20 Aug 2026 16:22:23 -0700 Subject: [PATCH 2/4] Incorporating bot's feedback --- .../swift-package-manager/for-app-developers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md index a28c4214ee..7a1dc1d78d 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md @@ -87,7 +87,8 @@ To remove CocoaPods from your project: 1. Check your configuration files: - In `ios/Flutter/Debug.xcconfig` and `ios/Flutter/Release.xcconfig` + In `ios/Flutter/Debug.xcconfig`, `ios/Flutter/Profile.xcconfig`, + and `ios/Flutter/Release.xcconfig` (and macOS equivalents under `macos/Flutter/`), remove any `#include` lines referencing `Pods/Target Support Files` or CocoaPods `.xcconfig` files if they are still present. From 3b3ed9b0cc6fdcb954edef1ee98ac9d209effeca Mon Sep 17 00:00:00 2001 From: "Shams Zakhour (ignore Sfshaza)" Date: Tue, 25 Aug 2026 11:18:28 -0700 Subject: [PATCH 3/4] Incorporating feedback --- .../for-app-developers.md | 101 +++++++++++------- 1 file changed, 64 insertions(+), 37 deletions(-) diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md index 7a1dc1d78d..ede3c7f300 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md @@ -45,61 +45,88 @@ you can [remove CocoaPods integration][removeCocoaPods]. ## How to remove CocoaPods integration +**Flutter falls back to CocoaPods if any of your project dependencies +do not support Swift Package Manager.** +Ensure that all plugins in your project support Swift Package Manager +before removing CocoaPods. When all Flutter plugins in your project support Swift Package Manager, you can remove CocoaPods integration completely from your project. :::note -Flutter falls back to CocoaPods if any of your project dependencies -do not support Swift Package Manager. -Ensure that all plugins in your project support Swift Package Manager -before removing CocoaPods. +If you have manually edited your `Podfile` to add CocoaPod +dependencies or logic other than Flutter plugins, +you must manually remove those changes. ::: -To remove CocoaPods from your project: + + -1. De-integrate CocoaPods from your Xcode projects: +To remove CocoaPods from your project, use the following steps. - * For iOS projects, run: +1. To de-integrate CocoaPods from your Xcode projects, run: - ```sh - cd ios - pod deintegrate - cd .. - ``` + ```sh + cd ios + pod deintegrate + cd .. + ``` - * For macOS projects, run: +2. Delete CocoaPods-related files and directories: - ```sh - cd macos - pod deintegrate - cd .. - ``` + Delete `ios/Podfile`, `ios/Podfile.lock`, + the `ios/Pods/` directory, and + the `ios/.symlinks/` directory (if present). -1. Delete CocoaPods-related files and directories: +3. Check your configuration files: - * For iOS, delete `ios/Podfile`, `ios/Podfile.lock`, - the `ios/Pods/` directory, and - the `ios/.symlinks/` directory (if present). + In `ios/Flutter/Debug.xcconfig` + and `ios/Flutter/Release.xcconfig` + remove any `#include` lines referencing `Pods/Target Support Files` + or CocoaPods `.xcconfig` files if they are still present. - * For macOS, delete `macos/Podfile`, `macos/Podfile.lock`, - the `macos/Pods/` directory, and - the `macos/.symlinks/` directory (if present). +4. Clean and build your project to verify the migration: -1. Check your configuration files: + ```sh + flutter clean + flutter pub get + flutter run + ``` - In `ios/Flutter/Debug.xcconfig`, `ios/Flutter/Profile.xcconfig`, - and `ios/Flutter/Release.xcconfig` - (and macOS equivalents under `macos/Flutter/`), - remove any `#include` lines referencing `Pods/Target Support Files` - or CocoaPods `.xcconfig` files if they are still present. + + -1. Clean and build your project to verify the migration: +To remove CocoaPods from your project, use the following steps. - ```sh - flutter clean - flutter pub get - flutter run - ``` +1. To de-integrate CocoaPods from your Xcode projects, run: + + ```sh + cd macos + pod deintegrate + cd .. + ``` + +2. Delete CocoaPods-related files and directories: + + Delete `macos/Podfile`, the `macos/Pods/` directory, + and the `macos/.symlinks/` directory (if present). + +3. Check your configuration files: + + In `macos/Flutter/Debug.xcconfig`, `macos/Flutter/Profile.xcconfig`, + and `macos/Flutter/Release.xcconfig` + remove any `#include` lines referencing `Pods/Target Support Files` + or CocoaPods `.xcconfig` files if they are still present. + +4. Clean and build your project to verify the migration: + + ```sh + flutter clean + flutter pub get + flutter run + ``` + + + ## How to add Swift Package Manager integration manually From 7215078b55a45cc1351b10acaea1bbea40f7b15e Mon Sep 17 00:00:00 2001 From: "Shams Zakhour (ignore Sfshaza)" Date: Tue, 25 Aug 2026 11:47:59 -0700 Subject: [PATCH 4/4] tweak --- .../swift-package-manager/for-app-developers.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md index ede3c7f300..cee54cd1fe 100644 --- a/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md +++ b/sites/docs/src/content/packages-and-plugins/swift-package-manager/for-app-developers.md @@ -49,8 +49,6 @@ you can [remove CocoaPods integration][removeCocoaPods]. do not support Swift Package Manager.** Ensure that all plugins in your project support Swift Package Manager before removing CocoaPods. -When all Flutter plugins in your project support Swift Package Manager, -you can remove CocoaPods integration completely from your project. :::note If you have manually edited your `Podfile` to add CocoaPod