Thank you for your reply.
So I think the cause is in my code.
Is it possible to send you an excerpt of the code so you can check for any problems?
Or I would be happy to send you the entire source code for you to check.
If you can check my app code, I share it with your Link.
import UIKit
import GoogleMobileAds
import AppTrackingTransparency
class Admob: NSObject, GADBannerViewDelegate {
class var Instance: Admob {
struct Static {
static let inst: Admob = Admob()
}
return Static.inst
}
static func getAdBannerView(_ viewController: UIViewController) -> GADBannerView {
var bannerView: GADBannerView = GADBannerView()
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: {status in
bannerView = GADBannerView(adSize:GADAdSizeBanner)
bannerView.frame.origin = CGPoint(x: 0, y: 0)
bannerView.frame.size = CGSize(width: 325, height: 50)
bannerView.adUnitID = "ca-app-pub-8151928728657048/
4727276862" // Enter Ad's ID here
bannerView.delegate = Instance
bannerView.rootViewController = viewController
let request:GADRequest = GADRequest()
//request.testDevices = [kGADSimulatorID, "e6cfec14a364685bacbcf949bb123f5a", "5890ffced044af1d8f8aa98ae704c77f"]
//request.testDevices = [ kGADSimulatorID as! String, "9740bf7fbe1b3f0f7d7649a2d7a585b6" ];
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ GADSimulatorID as! String, "" ];
bannerView.load(request)
})
} else {
bannerView = GADBannerView(adSize:GADAdSizeBanner)
bannerView.frame.origin = CGPoint(x: 0, y: 0)
bannerView.frame.size = CGSize(width: 325, height: 50)
bannerView.adUnitID = "ca-app-pub-8151928728657048/
4727276862" // Enter Ad's ID here
bannerView.delegate = Instance
bannerView.rootViewController = viewController
let request:GADRequest = GADRequest()
//request.testDevices = [kGADSimulatorID, "e6cfec14a364685bacbcf949bb123f5a", "5890ffced044af1d8f8aa98ae704c77f"]
//request.testDevices = [ kGADSimulatorID as! String, "9740bf7fbe1b3f0f7d7649a2d7a585b6" ];
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ GADSimulatorID as! String, "" ];
bannerView.load(request)
}
return bannerView
}
static func shAdView(_ adHeight: NSLayoutConstraint) {
if FileReader.checkAdTapExpired() {
adHeight.constant = 50
}
else {
adHeight.constant = 0
}
}
func adViewDidReceiveAd(_ bannerView: GADBannerView) {
}
func adViewWillLeaveApplication(_ bannerView: GADBannerView) {
FileReader.saveLastAdTapTime()
}
}
code of displaying ads.