Catch up on everything announced at Firebase Summit, and learn how Firebase can help you accelerate app development and run your app with confidence. Learn More

FirebaseAnalytics Framework Reference

Stay organized with collections Save and categorize content based on your preferences.


Sets the applicable end user consent state.

  • Sets the applicable end user consent state (e.g. for device identifiers) for this app on this device. Use the consent settings to specify individual consent type values. Settings are persisted across app sessions. By default consent types are set to ConsentStatus.granted.



    class func setConsent(_ consentSettings: [ConsentType : ConsentStatus])



    A Dictionary of consent types. Supported consent type keys are ConsentType.adStorage and ConsentType.analyticsStorage. Valid values are ConsentStatus.granted and ConsentStatus.denied.