Page Summary
-
The Google Mobile Ads SDK supports fixed ad sizes as an alternative to adaptive banners.
-
Standard fixed banner ad sizes and their availability on phones and tablets are provided.
-
You can define a custom banner size using the provided functions for Swift and Objective-C.
-
Example code for fixed size banner ads is available for both Swift and Objective-C.
Google Mobile Ads SDK supports fixed ad sizes for situations where adaptive banners ads don't meet your needs.
The following table lists the standard banner sizes.
| Size in dp (WxH) | Description | Availability | AdSize constant |
|---|---|---|---|
| 320x50 | Banner | Phones and tablets | GADAdSizeBanner |
| 320x100 | Large banner | Phones and tablets | GADAdSizeLargeBanner |
| 300x250 | IAB medium rectangle | Phones and tablets | GADAdSizeMediumRectangle |
| 468x60 | IAB full-size banner | Tablets | GADAdSizeFullBanner |
| 728x90 | IAB leaderboard | Tablets | GADAdSizeLeaderboard |
To define a custom banner size, set your size using GADAdSizeFromCGSize:
Swift
let adSize = adSizeFor(cgSize: CGSize(width: 250, height: 250))
Objective-C
GADAdSize size = GADAdSizeFromCGSize(CGSizeMake(250, 250));
Set an ad size smaller than or equal to the device screen size.
To determine the maximum screen size on iOS 26 and later, use the
UIWindowScene.effectiveGeometry.coordinateSpace
property. On iOS 18 and earlier, use the
UIWindowScene.coordinateSpace
property.
For details about size constraints, see
Ad request size requirements.