You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I got an error when I try to add a Banner View to my app.
The error detail is as follow:
You must set the rootViewController property of <GADInternalBannerView: 0x107c20dd0; frame = (0 0; 393 61); clipsToBounds = YES; hidden = YES; autoresize = W+H; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x600000327040>> before loading a request.
I've added the following code when initial the Banner view which fixed the error.
let scenes = UIApplication.shared.connectedScenes
let windowScene = scenes.first as? UIWindowScene
let window = windowScene?.windows.first
banner.rootViewController = window?.rootViewController
The text was updated successfully, but these errors were encountered:
Hi @tw-number-one we recommend upgrading to the latest version of the Google Mobile Ads SDK, or at least version 11.0.0 because the rootViewController property is an optional property in SDK version >= 11.0.0
Hi
I got an error when I try to add a Banner View to my app.
The error detail is as follow:
You must set the rootViewController property of <GADInternalBannerView: 0x107c20dd0; frame = (0 0; 393 61); clipsToBounds = YES; hidden = YES; autoresize = W+H; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x600000327040>> before loading a request.
I've added the following code when initial the Banner view which fixed the error.
The text was updated successfully, but these errors were encountered: