Plugin(s)
Current problem
Multiple consent calls cannot be sent within one function:
if (isPlatform(["web", "android", "ios"])) {
const consent = await Preferences.get({ key: 'cookieConsent' });
await FirebaseAnalytics.setConsent({
type: ConsentType.AdPersonalization,
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
await FirebaseAnalytics.setConsent({
type: ConsentType.PersonalizationStorage,
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
await FirebaseAnalytics.setConsent({
type: ConsentType.AdUserData,
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
await FirebaseAnalytics.setConsent({
type: ConsentType.AdStorage,
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
await FirebaseAnalytics.setConsent({
type: ConsentType.AnalyticsStorage,
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
}
We get the following error:
VM4026:944 Uncaught (in promise) Error: consentType must be provided.
at returnResult (<anonymous>:944:32)
at win.androidBridge.onmessage (<anonymous>:919:21)
Preferred solution
Passing all the types in one parameter would result in only one call.
await FirebaseAnalytics.setConsent({
type: [ConsentType.AnalyticsStorage, ConsentType.AdUserData],
status: consent.value === 'authorized' ? ConsentStatus.Granted : ConsentStatus.Denied
});
Alternative options
No response
Additional context
No response
Before submitting
Plugin(s)
Current problem
Multiple consent calls cannot be sent within one function:
We get the following error:
Preferred solution
Passing all the types in one parameter would result in only one call.
Alternative options
No response
Additional context
No response
Before submitting