Some apps are not configured to use Apple’s SKAdNetwork
I am getting this message from Admob. I think my Interstitial ads for IOS don’t work because of this problem. I tried to do what the documentation said I should but I wasn’t able to send the form.
I used this code to send the form but it didn’t take.
private ConsentForm _consentForm;
void Start()
{
// Set tag for under age of consent.
// Here false means users are not under age of consent.
DontDestroyOnLoad(this.gameObject);
ConsentRequestParameters request = new ConsentRequestParameters
{
TagForUnderAgeOfConsent = false,
};
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
if (ConsentInformation.IsConsentFormAvailable())
{
LoadForm();
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
}
/*void LoadConsentForm()
{
// Loads a consent form.
ConsentForm.Load(OnLoadConsentForm);
}*/
void LoadForm()
{
// Loads a consent form.
ConsentForm.Load(OnLoadConsentForm);
}
void OnLoadConsentForm(ConsentForm consentForm, FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// The consent form was loaded.
// Save the consent form for future requests.
_consentForm = consentForm;
// You are now ready to show the form.
if (ConsentInformation.ConsentStatus == ConsentStatus.Required)
{
_consentForm.Show(OnShowForm);
}
}
void OnShowForm(FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// Handle dismissal by reloading form.
LoadForm();
}
}