UMPConsentInformation.sharedInstance.formStatus always UMPFormStatusUnAvailable

1,606 views
Skip to first unread message

Jörg Bleyel

unread,
Aug 15, 2020, 4:06:13 AM8/15/20
to Google Mobile Ads SDK Developers

Here is my test code.

What's wrong?

Any way to debug?



        [UMPConsentInformation.sharedInstance

        requestConsentInfoUpdateWithParameters:parameters

                             completionHandler:^(NSError* _Nullable error) {


           // The consent information has updated.

           if (error) {

             // Handle the error.

           } else {

             // The consent information state was updated.

             // You are now ready to see if a form is available.

             UMPFormStatus formStatus =

                 UMPConsentInformation.sharedInstance

                     .formStatus;

             if (formStatus == UMPFormStatusAvailable) {

               [self loadForm];

             }

           }

         }];

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 16, 2020, 9:18:58 PM8/16/20
to goo...@bleyel.de, google-adm...@googlegroups.com

Hi Jörg,

Thank you for reaching out to us.

The User Messaging Platform was only fully supported by Google starting from August 15, and should not have been expected to work prior to that date. There might also have been timezone differences to take account for during that time, which might explain why the UMP would not work exactly on that date.

With that said, could you kindly confirm if this issue still persists on your end? If it does, you may kindly provide the details below (via Reply privately to author) so that we can further investigate the issue:

  • Copy of a sample project (replicating the issue)
  • Steps to reproduce the issue


Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5004Q23KUBT:ref

funn skill India

unread,
Aug 17, 2020, 1:39:06 AM8/17/20
to Google Mobile Ads SDK Developers
I like share

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 17, 2020, 2:17:51 AM8/17/20
to sohail...@gmail.com, google-adm...@googlegroups.com

Hi there,



Thank you for reaching out to us.

Could you elaborate your concern so we could further assists you? If your concern isn't related to this thread, I would recommend opening a new thread instead for better tracking of the issue.

Regards,
Mark Albios
Mobile Ads SDK Team



ref:_00D1U1174p._5004Q23KUBT:ref

Jörg Bleyel

unread,
Aug 17, 2020, 9:46:14 AM8/17/20
to Google Mobile Ads SDK Developers

This is my testcode:

 [UMPConsentInformation.sharedInstance reset];

        

        // Create a UMPRequestParameters object.

        UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];

        UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];

//        debugSettings.testDeviceIdentifiers = @[ @"TEST-DEVICE-HASHED-ID" ];

        debugSettings.geography = UMPDebugGeographyDisabled;

        parameters.debugSettings = debugSettings;

        

        // Set tag for under age of consent. Here @NO means users are not under age.

        parameters.tagForUnderAgeOfConsent = @NO;



The formStatus is always UMPFormStatusUnavailable.

Jörg Bleyel

unread,
Aug 17, 2020, 9:52:12 AM8/17/20
to Google Mobile Ads SDK Developers
Update ..

This line is the problem.

parameters.tagForUnderAgeOfConsent = @NO;


Why?




Am Montag, 17. August 2020 08:17:51 UTC+2 schrieb mobileadssdkforumadvisor:

Jörg Bleyel

unread,
Aug 17, 2020, 10:42:28 AM8/17/20
to Google Mobile Ads SDK Developers
The form is now ok and will displayed.

But i can't use your new framework because of no multi language feature.

It's useless!

I can create a form for each language.
But i can activate only one.


Am Montag, 17. August 2020 08:17:51 UTC+2 schrieb mobileadssdkforumadvisor:

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 17, 2020, 2:08:26 PM8/17/20
to goo...@bleyel.de, google-adm...@googlegroups.com
Hi Jorg,

Thank you for bringing these concerns and issues to our attention. I work with Mark, and will be assisting you today with this issue. As this is something that we do not handle on our end, and looks like you have the implementation working properly. This appears to be more of a display and variance of consent forms. I will be bring this issue to my team to see what other options are available to you. And how in the future we can use this to improve the UMP SDK for you and all users.

Regards,
William Pescherine

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 19, 2020, 11:05:21 PM8/19/20
to goo...@bleyel.de, google-adm...@googlegroups.com

Hi Jörg,

I just want to check in on this thread to inform you that I've created a feature request for multiple language functionality for the UMP. You may follow our blog or release notes for future updates on this.

Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5004Q23KUBT:ref

tommy.a...@gmail.com

unread,
Aug 25, 2020, 11:00:46 AM8/25/20
to Google Mobile Ads SDK Developers
Hi, I am having the same issue. Can you help? Thanks.

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 25, 2020, 12:34:06 PM8/25/20
to tommy.a...@gmail.com, google-adm...@googlegroups.com
Hi Tommy,

Thank you for bringing this question to our attention. If your question is in regards to the consent not working properly with this line:

           parameters.tagForUnderAgeOfConsent = @NO;

We are suggesting that you remove the @ so it looks like this:

           parameters.tagForUnderAgeOfConsent = NO;

From what we have seen through our testing and discussions with my team. This should fix anything related to that.

If the issue in question has to do with something other then this. Can you kindly pass along a more detailed description of the issue as well as any code sample for us to look at regarding this.


Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q23KUBT:ref

tommy.a...@gmail.com

unread,
Aug 25, 2020, 1:02:28 PM8/25/20
to Google Mobile Ads SDK Developers
Hi,
my issue has to do with getting form status being unavailable all the time. Below is my code. Thanks.

                UMPConsentInformation.sharedInstance.reset()       

                let param = UMPRequestParameters()

                param.tagForUnderAgeOfConsent = true

                UMPConsentInformation.sharedInstance.requestConsentInfoUpdate(with: param) { (error) in

                    if error != nil {

                        //handle error

                    } else {

                        // The consent information state was updated.

                        // You are now ready to see if a form is available.

                        let status = UMPConsentInformation.sharedInstance.formStatus                        

                        if status == .available {

                            UMPConsentForm.load { (form, error) in

                                if error != nil {

                                    //handle error

                                } else {

                                    if UMPConsentInformation.sharedInstance.consentStatus == .required {

                                        form?.present(from: self, completionHandler: { (error) in

                                        })

                                    }

                                }

                            }

                        }                        

                    }

                }

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 25, 2020, 1:32:53 PM8/25/20
to tommy.a...@gmail.com, google-adm...@googlegroups.com
Hi Tommy,

Thank you for the code sample. is this for iOS or Android as it does not seem to follow either one of them. Their appears to be a difference with the param.tageForUnderAgeConsent. Which does not match with what we have. As well as a few other lines.

tommy.a...@gmail.com

unread,
Aug 25, 2020, 2:07:38 PM8/25/20
to Google Mobile Ads SDK Developers
It is iOS in swift. Example code is in objective c. 

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 25, 2020, 3:14:16 PM8/25/20
to tommy.a...@gmail.com, google-adm...@googlegroups.com
Hi Tommy,

Thank you for the additional information regarding the code snippet.Allow me to bring this to my team to look at it further. As you can see the documentations are all done with Objective C. And want to see what my team would advise within regards to the use of swift with this.

Once we have some feedback we will get back into touch. Or someone from my team will contact you regarding this.

Hans Schneider

unread,
Aug 27, 2020, 3:53:36 AM8/27/20
to Google Mobile Ads SDK Developers

I"ve got the same problem. I have set up GDPR and IDFA messages on the Funding Choices backend. When I call UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:parameters  completionHandler:  the  UMPConsentInformation.sharedInstance.formStatus is always UMPConsentStatusNotRequired. Even with a freshly installed app. I am located in Europe btw

Thanks and regards, Hans Schneider

Nikunj Gabani

unread,
Sep 2, 2020, 8:00:20 AM9/2/20
to Google Mobile Ads SDK Developers
Hi,

I am having the same issue
Please help

Victoriano Montemayor

unread,
Sep 7, 2020, 5:56:37 PM9/7/20
to Google Mobile Ads SDK Developers
Any news on this? I'm also having this issue. I've followed the guide faithfully and can't get the dialog to show. 

trushali sangani

unread,
Sep 8, 2020, 5:18:45 AM9/8/20
to Google Mobile Ads SDK Developers

Hi,
I am also getting the same issue in my swift project.
Please help

Julian Avram

unread,
Sep 10, 2020, 6:37:06 PM9/10/20
to Google Mobile Ads SDK Developers
Also using swift and my code is similar to Tommy's and the IOS 14 simulator.  Setup EU consent and IDFA messages in the backend.
The IDFA message never appears as the status is always Unavailable.
setting the debugSettings to .EEA will bring up the GDPR message, however there's no request for ATT after.

Julian Avram

unread,
Sep 11, 2020, 10:25:01 AM9/11/20
to Google Mobile Ads SDK Developers
Got some PMs to share my Swift code.  There are no Swift examples in the docs so thought I'd share what I have.
This code should bring in the GDPR message if you linked the app to the Funding Choices account and have a GDPR message setup and activated.


//UMPConsentInformation.sharedInstance.reset()  // always render a consent form

let debugSettings = UMPDebugSettings()
let parameters = UMPRequestParameters()

debugSettings.testDeviceIdentifiers = [""]
debugSettings.geography = .EEA
parameters.debugSettings = debugSettings
parameters.tagForUnderAgeOfConsent = false

UMPConsentInformation.sharedInstance.requestConsentInfoUpdate(with: parameters, completionHandler: {(error) in
if let error = error as NSError? {
      // deal with error
     print(error)
} else { // now check for available form and load it
 
  let formStatus = UMPConsentInformation.sharedInstance.formStatus
  print(formStatus.rawValue)

  if formStatus == .available {
    self.loadForm()
  }
}


 func loadForm() {
   UMPConsentForm.load(completionHandler: { (form, loadError) in
       if let error = loadError as NSError? {
          // deal with error loading form
        print(error);
       } else {
        print(UMPConsentInformation.sharedInstance.consentStatus.rawValue)
           // If user didn't get a consent form before, display it
           if UMPConsentInformation.sharedInstance.consentStatus == .required {
            form?.present(from: self.viewController, completionHandler: {(error) in
               if UMPConsentInformation.sharedInstance.consentStatus == .obtained {
                   // user gave consent
                   // OK to serve ads
               } else {
                   // not OK to serve ads
                   }
               })
           } else if UMPConsentInformation.sharedInstance.consentStatus == .obtained {
            // if user received the consent form before and gave consent
            // OK to serve ads
           }
       }
   })
 }

Victoriano Montemayor

unread,
Sep 11, 2020, 5:49:56 PM9/11/20
to Google Mobile Ads SDK Developers

OK, after a while the dialog started showing. Can’t really say what I was doing wrong but now that it works I can tell you need to:

  • Make sure you have  debugSettings.geography = UMPDebugGeographyEEA;
  • Make sure you go to Admob Console > Privacy & Messaging > Go to Funding choices and your App is Active. Also make sure you have both a Consent Message and an IDFA Message and that both are Active. (I also believe that if you have recently created this messages you have to wait some time for them to show up, like about 24 hours)
  • If consent has been already shown call [UMPConsentInformation.sharedInstance reset]; to test it again.
  • Make sure you are not showing/calling any other dialog at the same time
Hope this helps! 

This is my code: 

- (void)initAdConsent {

    // ========= FOR TESTING BEGIN ==========

    UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init];

    UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];

    debugSettings.geography = UMPDebugGeographyEEA;

    parameters.debugSettings = debugSettings;

    parameters.tagForUnderAgeOfConsent = NO;

    [UMPConsentInformation.sharedInstance reset];

    // ========= FOR TESTING END ==========


    [UMPConsentInformation.sharedInstance

        requestConsentInfoUpdateWithParameters:parameters completionHandler:^(NSError *_Nullable error) {

                                 if (error) {

                                   [self initAds];

                               } else {

                                   UMPFormStatus formStatus = UMPConsentInformation.sharedInstance.formStatus;

                                   if (formStatus == UMPFormStatusAvailable) {

                                       [self loadForm];   // Show form THEN    [self initAds];

                                   }   else {

                                       [self initAds];

                                   }

                          }];

tommy.a...@gmail.com

unread,
Sep 12, 2020, 11:12:41 AM9/12/20
to Google Mobile Ads SDK Developers
with the same code as yours, now I get prompted for ATT the first time but not GDPR if I uninstall and reinstall the app. I never get prompted for GDPR although I have geo set to EEA.

Lucas Paul

unread,
Oct 15, 2020, 4:40:17 AM10/15/20
to Google Mobile Ads SDK Developers
Hello. We are also facing the same issue on iOS, the form status is always unavailable (while on our Android App the form shows up correctly). We have created a sample app that exhibits that behaviour, where the form does not load. To whom shall we forward it privately so it can be checked? Thank you for your time!
Reply all
Reply to author
Forward
0 new messages