Skip to content

[google_maps_flutter] Replace FGM_USING_COCOAPODS with the built-in COCOAPODS#11287

Closed
stuartmorgan-g wants to merge 2 commits intoflutter:mainfrom
stuartmorgan-g:google-maps-cocoapods-built-in-define
Closed

[google_maps_flutter] Replace FGM_USING_COCOAPODS with the built-in COCOAPODS#11287
stuartmorgan-g wants to merge 2 commits intoflutter:mainfrom
stuartmorgan-g:google-maps-cocoapods-built-in-define

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Rather than setting our own define to detect CocoaPods-based builds, use the built-in COCOAPODS define.

May address flutter/flutter#183441

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

@flutter-dashboard
Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

test-exempt: code refactor with no semantic change

Copy link
Copy Markdown

@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 replaces the custom FGM_USING_COCOAPODS preprocessor macro with the standard COCOAPODS macro to detect CocoaPods-based builds. The change involves removing the custom macro definition from the .podspec files and updating the conditional import logic in several GoogleMapsUtilsTrampoline.h header files across different versions of the google_maps_flutter_ios plugin.

@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 18, 2026
@vashworth
Copy link
Copy Markdown
Contributor

@stuartmorgan-g Can you verify that this does not break a normal Flutter app that's using both SwiftPM and CocoaPods? I think COCOAPODS=1 may get passed to the Runner target and therefore also maybe the google_maps_sdk* plugin since it's static

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

You're correct, it's set for Runner (via the included xcconfig), and breaks the build. Good catch.

So much for this approach then :(

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.

2 participants