I have the following code.
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.canDisplayBannerAds = true
self.theTopAdBannerView?.hidden = false
func loadAds(){
theTopAdBannerView.delegate = self
theTopAdBannerView.hidden = false
view.addSubview(theTopAdBannerView)
}
loadAds()
}
I made sure I linked up theTopAdBannerView outlet to the AdBanner. When I open it, it just shows a blank white space on where I placed the AdBanner in the storyboard. Why aren't my ads showing up?
I get this error
Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x7f9e2b5e3640 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content, ADInternalErrorDomain=ADErrorDomain}
Apparently my ad wasn't loading. All of a sudden it loads fine now. The code is fine.