[iOS] UMPMainWindowView added unexpectedly when calling requestConsentInfoUpdate using async/await

18 views
Skip to first unread message

N.Yuasa

unread,
Jul 17, 2025, 4:55:19 AM7/17/25
to Google Mobile Ads SDK Developers
Problem Description: 
When ConsentInformation.shared.requestConsentInfoUpdate(with:) is called using Swift's async/await syntax, an unexpected UMPMainWindowView appears as a subview within the UIWindow. This view appears to be an unintended or misplaced element, as no consent form is presented at that time. Furthermore, when VoiceOver is enabled, it incorrectly focuses on this invisible UMPMainWindowView, hindering accessibility and user experience.

Expected Behavior: 
UMPMainWindowView should not be added to the view hierarchy or, if present for internal reasons, must be hidden and correctly configure its accessibility traits to prevent VoiceOver from focusing on it when no consent form is visible.

Steps to Reproduce:
Run the following code and observe console output for the unexpected UMPMainWindowView

'''swift
import UIKit
import GoogleMobileAds
import UserMessagingPlatform

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        testUMP()
    }

    func testUMP() {
        Task {
            await MobileAds.shared.start()
            let parameters = RequestParameters()
            let debugSettings = DebugSettings()
            debugSettings.geography = .EEA
            parameters.debugSettings = debugSettings
            try! await ConsentInformation.shared.requestConsentInfoUpdate(with: parameters)

            guard let window = view.window else { return }
            print("Subviews: \(window.subviews.count)")
            for subview in window.subviews {
                print("  - \(type(of: subview)), frame: \(subview.frame)")
            }
        }
    }
}
'''

Observed output:
Subviews: 2
 - UMPMainWindowView, frame: (-1.0, -1.0, 1.0, 1.0)
 - UITransitionView, frame: (0.0, 0.0, 440.0, 956.0)

Additional Information:
  • The issue only occurs when using async/await (either native or custom wrapper)
  • The view does not appear when using the traditional completion handler version of requestConsentInfoUpdate
  • VoiceOver focuses on the invisible UMPMainWindowView, disrupting accessibility.
Environment:
  • Xcode Version: 16.3
  • GoogleMobileAds SDK Version: 12.7.0
  • GoogleUserMessagingPlatform SDK Version: 3.0.0
  • Affected on both device and simulator

Reply all
Reply to author
Forward
0 new messages