It shows test Ads on the Simulator and on real device. But when I change the Ad ID to my real one, it is not working.. My App is also in the AppStore, but I did not push the update. I only added AdMob in Xcode and then connected my real device and tested on it. Have I to publish the new update with AdMob to the App Store to see the real ads? What should I do? I would like to test my real ads before pushing update..
(Payment details already filled)
final private class BannerVC: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
let view = GADBannerView(adSize: kGADAdSizeBanner)
let viewController = UIViewController()
view.adUnitID = bannerID
view.rootViewController = viewController
viewController.view.addSubview(view)
viewController.view.frame = CGRect(origin: .zero, size: kGADAdSizeBanner.size)
view.load(GADRequest())
return viewController
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
struct Banner:View{
var body: some View{
HStack{
Spacer()
BannerVC().frame(width: 320, height: 50, alignment: .center)
Spacer()
}
}
}
question from:https://stackoverflow.com/questions/65560155/admob-shows-test-ads-but-not-real-ads-swift-swiftui