[various] Remove CocoaPods from examples#11237
[various] Remove CocoaPods from examples#11237auto-submit[bot] merged 3 commits intoflutter:mainfrom
Conversation
For almost all projects in the repository, this does the steps recommended by the warning when building with Swift Package Manager enabled (for both ios/ and macos/, wherever they are present): - Runs `pod deintigrate` - Deletes `Podfile` - Removes the CocoaPod xcconfig references in the Flutter Debug and Release xcconfigs. When running without Swift Package Manager enabled, `flutter` will automatically re-add this integration, so this won't break anyone running these examples on `stable`. However, we are no longer expecting this to be a common workflow (CI no longer builds these apps in non-SwiftPM mode, and regular flutter/package contributors are likely to be on `master` where SwiftPM is on by default now), so it's no longer useful to have the integration checked in. The only packages that have not had Pod integration removed are: - `google_maps_flutter_ios` because it doesn't (and can't) support Swift Package Manager. - `google_maps_flutter` because it depends on `google_maps_flutter_ios` as the default implementation. Follow-up to flutter/flutter#172427
There was a problem hiding this comment.
Code Review
This pull request removes CocoaPods integration from numerous example applications across various packages. The changes include the deletion of Podfiles, removal of CocoaPods-related includes from .xcconfig files, and updates to Xcode project files (.pbxproj) to eliminate all references to CocoaPods build phases, frameworks, and configurations. In some cases, Swift Package Manager dependencies are introduced through new Package.resolved files, reflecting a migration in dependency management.
This turned out not to be entirely true. I didn't think about the fact that the I think that's fine since we don't expect this to be a common use case, and the fix is easy to apply locally if someone does need to build on stable, so unless it becomes a significant issue I don't think we should revert. It did accidentally break the tree though, which I'm fixing in the repo tooling. |
Currently the iOS/macOS part of `fetch-deps` uses whatever the default Swift Package Manager setting is, even though the `build-examples` command is always using Swift Package Manager. That means that it's caching a bunch of things we don't need. This PR adds a `--swift-package-manager` flag to `fetch-deps`, and passes the same value we are using for `build-examples`. This fixes the tree breakage on macOS stable. Some of our macOS example projects don't have RunnerTest targets, and the default template version of `Podfile` assumes there is one (since it's part of the template project), so re-enabling the CocoaPods build after #11237 requires a small manual change to Podfile. Since any CocoaPods builds of those projects should be manual, that should be fine, but without this PR we are accidentally hitting that in CI.
flutter/packages@91f7c33...0f2eeae 2026-03-16 [email protected] [tool] Add a SwiftPM flag to fetch-deps (flutter/packages#11258) 2026-03-14 [email protected] [various] Remove CocoaPods from examples (flutter/packages#11237) 2026-03-14 [email protected] Roll Flutter from 9e36adb to 732e05d (20 revisions) (flutter/packages#11242) 2026-03-13 [email protected] [go_router] Add `encoder`,`decoder` and `compare` parameters to `TypedQueryParameter` (flutter/packages#11067) 2026-03-13 [email protected] [camera] Remove outdated TODO in camera_controller.dart (flutter/packages#11239) 2026-03-13 [email protected] [google_sign_in_web]Fix renderButton stuck on "Getting ready" for Web (Future<void> issue) (flutter/packages#11081) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Currently the iOS/macOS part of `fetch-deps` uses whatever the default Swift Package Manager setting is, even though the `build-examples` command is always using Swift Package Manager. That means that it's caching a bunch of things we don't need. This PR adds a `--swift-package-manager` flag to `fetch-deps`, and passes the same value we are using for `build-examples`. This fixes the tree breakage on macOS stable. Some of our macOS example projects don't have RunnerTest targets, and the default template version of `Podfile` assumes there is one (since it's part of the template project), so re-enabling the CocoaPods build after #11237 requires a small manual change to Podfile. Since any CocoaPods builds of those projects should be manual, that should be fine, but without this PR we are accidentally hitting that in CI.
For almost all projects in the repository, this does the steps recommended by the warning when building with Swift Package Manager enabled (for both ios/ and macos/, wherever they are present):
pod deintigratePodfileWhen running without Swift Package Manager enabled,
flutterwill automatically re-add this integration, so this won't break anyone running these examples onstable. However, we are no longer expecting this to be a common workflow (CI no longer builds these apps in non-SwiftPM mode, and regular flutter/package contributors are likely to be onmasterwhere SwiftPM is on by default now), so it's no longer useful to have the integration checked in.The only packages that have not had Pod integration removed are:
google_maps_flutter_iosbecause it doesn't (and can't) support Swift Package Manager.google_maps_flutterbecause it depends ongoogle_maps_flutter_iosas the default implementation.This also removes the precache steps from
ios_build_all_packagesandmacos_build_all_packages. Because that step runs per package, it was doing a lot of caching of native code that was package-scoped, and thus wouldn't be used by the all-packages app, and in the current configuration isn't even the right kind of dependency (it will fetch SwiftPM deps, but the all-packages app uses CocoaPods still to cover that mode).Follow-up to flutter/flutter#172427
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2