To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

GoogleMobileAds Framework Reference

  • GADAdSize is a structure in Google Mobile Ads SDK that defines the size of an ad.

  • It has two properties: size which is a CGSize representing the dimensions of the ad, and flags which is reserved for internal use.

  • Developers should not directly modify the size property but should use predefined constants or methods to set the ad size.

GADAdSize

struct GADAdSize {}

Ad size.

See

typedef GADAdSize
  • The ad size. Don’t modify this value directly.

    Declaration

    Swift

    var size: CGSize

    Objective-C

    CGSize size
  • Reserved.

    Declaration

    Swift

    var flags: UInt

    Objective-C

    NSUInteger flags

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年08月20日 UTC.