Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Some apps are not configured to use Apple's SKAdNetwork

Discussion in 'Unity Ads & User Acquisition' started by asctvch, Sep 8, 2023.

  1. asctvch

    asctvch

    Joined:
    May 2, 2022
    Posts:
    1
    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.



    Code (CSharp):
    1.   private ConsentForm _consentForm;
    2.     void Start()
    3.     {
    4.         // Set tag for under age of consent.
    5.         // Here false means users are not under age of consent.
    6.         DontDestroyOnLoad(this.gameObject);
    7.         ConsentRequestParameters request = new ConsentRequestParameters
    8.         {
    9.             TagForUnderAgeOfConsent = false,
    10.         };
    11.  
    12.         // Check the current consent information status.
    13.         ConsentInformation.Update(request, OnConsentInfoUpdated);
    14.     }
    15.  
    16.     void OnConsentInfoUpdated(FormError error)
    17.     {
    18.         if (error != null)
    19.         {
    20.             // Handle the error.
    21.             UnityEngine.Debug.LogError(error);
    22.             return;
    23.         }
    24.         // If the error is null, the consent information state was updated.
    25.         // You are now ready to check if a form is available.
    26.         if (ConsentInformation.IsConsentFormAvailable())
    27.         {
    28.             LoadForm();
    29.         }
    30.         // If the error is null, the consent information state was updated.
    31.         // You are now ready to check if a form is available.
    32.     }
    33.     /*void LoadConsentForm()
    34.     {
    35.         // Loads a consent form.
    36.         ConsentForm.Load(OnLoadConsentForm);
    37.     }*/
    38.     void LoadForm()
    39.     {
    40.         // Loads a consent form.
    41.         ConsentForm.Load(OnLoadConsentForm);
    42.     }
    43.     void OnLoadConsentForm(ConsentForm consentForm, FormError error)
    44.     {
    45.         if (error != null)
    46.         {
    47.             // Handle the error.
    48.             UnityEngine.Debug.LogError(error);
    49.             return;
    50.         }
    51.  
    52.         // The consent form was loaded.
    53.         // Save the consent form for future requests.
    54.         _consentForm = consentForm;
    55.  
    56.         // You are now ready to show the form.
    57.         if (ConsentInformation.ConsentStatus == ConsentStatus.Required)
    58.         {
    59.             _consentForm.Show(OnShowForm);
    60.         }
    61.     }
    62.     void OnShowForm(FormError error)
    63.     {
    64.         if (error != null)
    65.         {
    66.             // Handle the error.
    67.             UnityEngine.Debug.LogError(error);
    68.             return;
    69.         }
    70.  
    71.         // Handle dismissal by reloading form.
    72.         LoadForm();
    73.     }
    74. }
     
  2. SamOYUnity3D

    SamOYUnity3D

    Unity Technologies

    Joined:
    May 12, 2019
    Posts:
    597