ios


iAd Won't Load Test Ads


iAd simply won't load the test ads and it's driving me insane. It just shows a white box and doesn't do any callbacks. This is all my code:
import UIKit
import iAd
class ViewController: UIViewController, ADBannerViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.canDisplayBannerAds = true
let adBanner = ADBannerView()
adBanner.delegate = self
self.view.addSubview(adBanner)
self.view.backgroundColor = UIColor.blackColor()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
class ViewController: UIViewController, ADBannerViewDelegate {
var adBannerView : ADBannerView
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.canDisplayBannerAds = true
adBannerView = ADBannerView(frame: self.view.bounds)
adBannerView.center = CGPoint(x: adBannerView.center.x, y: view.bounds.size.height - adBannerView.frame.size.height / 2)
adBannerView.delegate = self
adBannerView.hidden = true
self.view.addSubview(adBannerView)
}
func bannerView(banner: ADBannerView!, didFailToReceiveAdWithError error: NSError!) {
//handle fail issue
bannerView.hidden = true
}
func bannerViewDidLoadAd(banner: ADBannerView!) {
bannerView.hidden = false
}
}

Related Links

iOS Not able to change the frame of UITextField inputAccessoryView.superview
Publishing issue, Callkit is included even we are not using it
How to get crash information from a TestFlight launched app?
Parse: Updating relation on user in Local Datastore
iOS 10, Local notification show when app is in forground?
What is the reason for this UITableView not showing up on my view controller?
Xcode inserted fileprivate functions after updating to Swift 3 [duplicate]
Xamarin ios UItableView Empty rows at top using Task Scheduler in background
How to test iOS app's localization on a real device when using appium?
How to prevent NSInternalInconsistencyException with Realm and UICollectionView
(Swift, EarlGrey) move slider to the middle
How can I make physicBody dynamic only on needed levels?
check if item exists in core data EFFICIENTLY
How to continue in the background a connection started with NSURLConnection in the foreground?
Using delegate methods to save a custom cell textfield
Move a UILabel when changing to landscape

Categories

HOME
graph
performance
wix
whatsapp
azure-search
compliance
configuration
blogs
isis
anylogic
restsharp
ibm-midrange
plotly
android-vision
cobol
marketplace
group-by
fbx
phpbb3
amadeus
curve-fitting
nxbre
jpos
dsl
unsigned-integer
point-cloud-library
nested-loops
f2py
codewarrior
udid
python-responses
reed-solomon
sqlite.swift
mobilefirst-bluemix
dwm
perl-module
transpose
amazon-elasticsearch
tibco-ems
symfony-process
nomenclature
procobol
hostname
codeigniter-hmvc
xargs
ase
move
docker-swarm-mode
uifont
harvest-scm
cmsmadesimple
zbar
gpt
bosh-deployer
postmark
vispy
mit-scheme
facebook-audience-network
pager
webmail
intrinsics
gcloud-java
uiswitch
pddl
multiple-files
egl
armv7
actioncable
openocd
cng
symbian
mtp
nbug
scribe
repaint
sqlhelper
dynamic-typing
xacml3
asp.net-apicontroller
dataformat
angularjs-google-maps
xidel
prudentia
apache-commons-dbcp
buildout
mainwindow
nspersistentdocument
hudson-plugins
wescheme
eject
blackberry-cascades
applaud
qbwc
ed
katta
jammit
retain
having
pastebin
non-relational-database
68hc11
server.transfer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App