-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi there,
Just added the functionality to my App, the only thing is that it appears like the Reward Ad won't show up when using:
func makeUIViewController(context: Context) -> UIViewController
{
let view = UIViewController()
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1)) {
self.showAd(from: view)
}
return view
}
Change this code to:
func makeUIViewController(context: Context) -> UIViewController
{
let view = UIViewController()
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1)) {
self.showAd(from: (UIApplication.shared.windows.first?.rootViewController)!)
}
return view
}
Thanks for taking the time on doing this project about Google Ads on SwiftUI!
Metadata
Metadata
Assignees
Labels
No labels