This article will help you to validate your app's consent mode setup by running it in debug mode and monitoring the logs.
Validate for iOS
- Set debugging logs to verbose
- In Xcode, select Product > Scheme > Edit scheme...
- Select Run from the left menu.
- Select the Arguments tab.
- In the Arguments passed on launch section, add -FIRAnalyticsVerboseLoggingEnabled.
Advanced mode:
- Look for the following log lines to confirm that the defaults were set.
[FirebaseAnalytics][X-XXXXXXXXXX] ad_storage is denied.
analytics_storage is denied. ad_user_data is denied.[FirebaseAnalytics][X-XXXXXXXXXX] User property set. Name, value: _пра, 1
- After user consent choices are shared by triggering the consent mode API via a setConsent call, those choices will be shown in log lines like the following.
ad_storage is granted.
User property set. Name, value: _пра, 0
Note: When performing validations on iOS it’s recommended to use a physical device as the simulator has some restrictions such as no valid IDFA.
Basic mode:
Confirm that the first_open
event log isn’t sent until after the user consent choices are sent via consent mode as shown in the log lines directly above.
Learn more about Log Events Firebase.