GoogleMobileAds Framework Reference

GADAppOpenAd

@interface GADAppOpenAd : NSObject

Ad shown at app open time.

  • Loads an app open ad.

    Declaration

    Swift

    class func load(withAdUnitID adUnitID: String, request: GADRequest?, orientation: UIInterfaceOrientation, completionHandler: @escaping GADAppOpenAdLoadCompletionHandler)

    Objective-C

    + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID
                     request:(nullable GADRequest *)request
                 orientation:(UIInterfaceOrientation)orientation
           completionHandler:
               (nonnull GADAppOpenAdLoadCompletionHandler)completionHandler;

    Parameters

    adUnitID

    An ad unit ID created in the AdMob or Ad Manager UI.

    request

    An ad request object. If nil, a default ad request object is used.

    orientation

    The interface orientation that the ad will be presented in.

    completionHandler

    A handler to execute when the load operation finishes or times out.

  • Information about the ad response that returned the ad.

    Declaration

    Swift

    var responseInfo: GADResponseInfo { get }

    Objective-C

    @property (readonly, nonatomic, nonnull) GADResponseInfo *responseInfo;
  • Called when the ad is estimated to have earned money. Available for whitelisted accounts only.

    Declaration

    Swift

    var paidEventHandler: GADPaidEventHandler? { get set }

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        GADPaidEventHandler paidEventHandler;