feat(analytics): add Expo config plugin for withoutAdIdSupport#8969
feat(analytics): add Expo config plugin for withoutAdIdSupport#8969mikehardy merged 4 commits intoinvertase:mainfrom
Conversation
|
@safaiyeh is attempting to deploy a commit to the Invertase Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Code Review
This pull request introduces an Expo Config Plugin for @react-native-firebase/analytics, enabling users to opt out of iOS Ad ID support via the withoutAdIdSupport configuration option. The implementation includes documentation, build scripts, and logic to modify the iOS Podfile. Feedback suggests refining the linting glob pattern for better coverage, using relative paths for internal package references to ensure monorepo compatibility, and removing a redundant manual check in the Podfile modification logic.
Use relative path for package.json require and remove redundant FLAG idempotency check (mergeContents already handles it via TAG). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Expo passes undefined for props when the plugin is listed as a plain string without a config object. Add optional chaining on props. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@BugBot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit fcc8107. Configure here.
mikehardy
left a comment
There was a problem hiding this comment.
looks reasonable as a feature addition and well-done as code+tests, thanks!
we test iOS e2e in debug and release and they're always a bit flaky, one passed, and I'm sure the plugin code isn't going to affect only one variant so this is good to go w.r.t. CI
Description
This adds an Expo config plugin for
@react-native-firebase/analyticsso Expo and EAS users can declaratively opt out of iOS Ad ID support.Today the native CocoaPods integration already supports
$RNFirebaseAnalyticsWithoutAdIdSupport = true, but Expo users do not have a package-level config plugin for Analytics that can write that Podfile variable during prebuild.This PR adds that missing Expo surface by:
@react-native-firebase/analytics/app.plugin.jsios.withoutAdIdSupportPodfilewhenwithoutAdIdSupportis enabledRelated issues
Release Summary
ios.withoutAdIdSupportChecklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/**/e2ejesttests added or updated inpackages/**/__tests__Test Plan
./node_modules/.bin/tsc --build packages/analytics/plugin./node_modules/.bin/eslint packages/analytics/plugin/src packages/analytics/plugin/__tests__yarn tests:jest packages/analytics/plugin/__tests__/iosPlugin.test.ts🔥
Note
Medium Risk
Adds a new Expo config plugin that mutates the generated iOS
Podfilefor Analytics; risk is mainly around iOS prebuild/pods generation for Expo/EAS users if the merge/remove logic or anchor matching behaves unexpectedly.Overview
Enables Expo/EAS users of
@react-native-firebase/analyticsto declaratively disable iOS Ad ID support via a new config plugin optionios.withoutAdIdSupport.Adds an
app.plugin.jsentrypoint and a TypeScript Expo config plugin that injects (and can remove, idempotently)$RNFirebaseAnalyticsWithoutAdIdSupport = trueinto the generated iOSPodfileduring prebuild. Documentation is updated to show the new Expo configuration, and Jest coverage is added for the Podfile patching behavior.Updates
@react-native-firebase/analyticspackaging to build/export the plugin (preparerunsbuild:plugin), and adds optionalexpopeer dependency plus related dev deps/lockfile updates.Reviewed by Cursor Bugbot for commit fcc8107. Bugbot is set up for automated code reviews on this repo. Configure here.