Skip to content

[various] Remove CocoaPods from examples#11237

Open
stuartmorgan-g wants to merge 3 commits intoflutter:mainfrom
stuartmorgan-g:pod-deintegration
Open

[various] Remove CocoaPods from examples#11237
stuartmorgan-g wants to merge 3 commits intoflutter:mainfrom
stuartmorgan-g:pod-deintegration

Conversation

@stuartmorgan-g
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g commented Mar 12, 2026

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.

This also removes the precache steps from ios_build_all_packages and macos_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

Footnotes

  1. 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

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
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 13, 2026
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants