Open merbin2012 opened 4 months ago
As @merbin2012 mentions, existing sample code here shows:
const consentStatus = await consent.getConsentStatus()
if (consentStatus === consent.ConsentStatus.Required) {
await consent.requestInfoUpdate()
}
await consent.loadAndShowIfRequired()
which only calls await consent.requestInfoUpdate()
when consentStatus === consent.ConsentStatus.Required
, however on iOS I get the below error if not always first calling
await consent.requestInfoUpdate()
before calling:
await consent.loadAndShowIfRequired()
error:
Unhandled Promise Rejection: Consent form unavailable. Request a consent form using [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:completionHandler:]
I think you need to update your sample code.
"Uncaught No available form can be built." this error showing, if we call "
await consent.loadAndShowIfRequired()
" method before execute the following method "await consent.requestInfoUpdate()
"I think needs to remove the following lines
Kindly confirm once if am I right or wrong. Thank ou