Skip to content

Commit 65dbd4b

Browse files
authored
feat(analytics,ios): add support for FirebaseAnalyticsWithoutAdIdSupport with SPM (#18061)
1 parent a6a0554 commit 65dbd4b

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎docs/analytics/_get-started.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ await FirebaseAnalytics.instance
8383
);
8484
```
8585
86+
## Using Analytics without Ad ID support (iOS) {:#without-ad-id}
87+
88+
If your app doesn't use IDFA, you can use `FirebaseAnalyticsWithoutAdIdSupport`
89+
instead of the default `FirebaseAnalytics` iOS dependency to avoid App Store
90+
review questions about advertising identifiers.
91+
92+
### Swift Package Manager
93+
94+
Set the `FIREBASE_ANALYTICS_WITHOUT_ADID` environment variable when building:
95+
96+
```bash
97+
FIREBASE_ANALYTICS_WITHOUT_ADID=true flutter build ios
98+
```
99+
100+
You can also add this variable to your Xcode scheme's environment variables
101+
for persistent configuration.
102+
103+
### CocoaPods
104+
105+
Add this to your app's `Podfile`:
106+
107+
```ruby
108+
pod 'FirebaseAnalytics', :modular_headers => true
109+
pod 'FirebaseAnalyticsWithoutAdIdSupport', :modular_headers => true
110+
```
111+
86112
## Next steps
87113

88114
* Use the [DebugView](/docs/analytics/debugview) to verify your events.