Ich benutze AdMobs Smart Banner im Mai App, habe ich alles wie in Googles Getting Started vorgeschlagen, außer Bannergröße ist nicht behoben 320x50
, seine screen widthx50
. Im automatischen Layout habe ich 1 Einschränkung für die horizontale Mitte und 1 für die Bildschirmbreite hinzugefügt. Wenn ich laufen, dass am Simulator arbeitet ich toll, aber auf dem Gerät diesen Fehler Ich erhalte:Swift AdMob ad falsche Größe
<Google> Unable to set adSize property. Not enough space to show ad with custom size, {600, 50}. Please use a size that fits the current screen bounds of {320, 568}.
<Google> To get test ads on this device, call: request.testDevices = @[ @"bb3f8f97887" ];
<Google> Unable to set adSize property. Not enough space to show ad with custom size, {600, 50}. Please use a size that fits the current screen bounds of {320, 568}.
<Google> Invalid Request. Ad size will not fit on screen
Wenn ich GADBannerView Größen log ich dies immer (läuft auf iPhone 5):
Size: (0.0, 0.0, 320.0, 50.0)
Dies ist mein Code:
@IBOutlet weak var bannerView: GADBannerView!
bannerView.adUnitID = "ca-app-pub-394/216"
bannerView.adSize = kGADAdSizeSmartBannerPortrait
bannerView.rootViewController = self
print("Size: ",bannerView.bounds)
bannerView.loadRequest(GADRequest())
Das sind meine Constraints
Sie haben keine Einschränkung für die Breite. – TheValyreanGroup
Lol kein Problem. Es sind immer die kleinen Dinge. – TheValyreanGroup