0

I am doing an accessibility optimization for iOS, but running into the issue that the UMPConsentForm is present in the view hierarchy, even when it is the back window that is not seen and also it was not presented (previously agreed)

this is a problem with voiceover as it starts to read the dialog

implemented according to google online doc...

Moreover even when the consent is given in this app session, the window still sticks around

any ideas to behave this proper?

        // Request an update for the consent information.
        UMPConsentInformation.sharedInstance.requestConsentInfoUpdate(with: nil) { [weak self] requestConsentError in
           
            guard let self = self else {return}
            if let consentError = requestConsentError {
                return print("UMPConsentInformation Error: \(consentError.localizedDescription)")
            }

            // delay the consent presentation
            DispatchQueue.main.asyncAfter(deadline: .now() + 1.0, execute: {
               
                if let vc = TopControllerManager.shared.currentTopViewController ?? self.applicationRootController?.viewControllers.last {
                   
                    UMPConsentForm.loadAndPresentIfRequired(from: vc) { [weak self] loadAndPresentError in
                       
                        guard let self else { return }
                        if let consentError = loadAndPresentError {
                           
                            print("UMPConsentForm Error: \(consentError.localizedDescription)")
                           
                        } else {
                           
                            let adsEnabledAfter = AdsManager.shared.adsEnabled()
                            ...
                           
                        }
                       
                    }
                   
                }
            })
           
        }

enter image description here

Firebase 11.6.0

Google-Mobile-Ads-SDK 11.13.0

0