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()
}
}
}
I think you do need to publish the app in order to see real ads showing up. After that it takes a while for them to show, but if you're seeing test ads, from what I remember reading, it should indicate it has been set up correctly.
After you publish, make sure you are able to select the App Store listing in the AdMob settings: AdMob > [App Name] > App Settings > App Store
If it's not showing up there, but your test ads are working fine, you might just need to wait. I had a similar situation recently and it took a full 2 (maybe 3?) weeks before real ads started showing.
Also, double-check your GADApplicationIdentifier is correct in the Info.plist file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With