Skip to content

[google_maps_flutter] Add Android and iOS attribution ID#11731

Open
stuartmorgan-g wants to merge 3 commits into
flutter:mainfrom
stuartmorgan-g:maps-attribution
Open

[google_maps_flutter] Add Android and iOS attribution ID#11731
stuartmorgan-g wants to merge 3 commits into
flutter:mainfrom
stuartmorgan-g:maps-attribution

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Adds an attribution ID to allow association of Google Maps usage to this plugin in backend metrics. Known caveats:

  • This only does Android and iOS since there's a blocker on web.
  • On iOS, the necessary API was added in 9.2.0, and we still support back to 8.4.0 (for iOS 14 support), so iOS will only have attribution for apps build supporting iOS 15+ (in theory not all of those either since apps supporting iOS 15+ could have 9.0 or 9.1 in their podspec lock, but we don't expect that to be a significant number of users).

This can't be meaningfully tested because they are setters on static SDK objects that aren't inspectable. In theory we could make wrappers and then inject replacement global objects but the untestable parts of that setup would be more complex than the code in question so there's no value in doing that. Instead this will be verified on the backend. This call has no user-facing effect, so regression risk is also extremely low.

Part of flutter/flutter#168529

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

@stuartmorgan-g stuartmorgan-g requested a review from jmagman May 18, 2026 17:22
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 18, 2026
@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: can't be meaningfully tested; no client-discernable effect

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 adds internal usage attribution IDs for the Google Maps SDK across Android and various iOS implementations, including standard, SDK 9, and SDK 10 versions. The changes involve calling addInternalUsageAttributionId in the Android plugin and conditionally calling addInternalUsageAttributionID in the iOS plugins. Version numbers and changelogs have been updated accordingly. I have no feedback to provide.

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.

1 participant