GADUInterstitial.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2014 Google Inc. All Rights Reserved.
  2. #import <Foundation/Foundation.h>
  3. #import <GoogleMobileAds/GoogleMobileAds.h>
  4. #import "GADUTypes.h"
  5. /// A wrapper around GADInterstitial. Includes the ability to create GADInterstitial objects, load
  6. /// them with ads, show them, and listen for ad events.
  7. @interface GADUInterstitial : NSObject
  8. /// Initializes a GADUInterstitial.
  9. - (id)initWithInterstitialClientReference:(GADUTypeInterstitialClientRef *)interstitialClient
  10. adUnitID:(NSString *)adUnitID;
  11. /// The interstitial ad.
  12. @property(nonatomic, strong) GADInterstitial *interstitial;
  13. /// A reference to the Unity interstitial client.
  14. @property(nonatomic, assign) GADUTypeInterstitialClientRef *interstitialClient;
  15. /// The ad received callback into Unity.
  16. @property(nonatomic, assign) GADUInterstitialDidReceiveAdCallback adReceivedCallback;
  17. /// The ad failed callback into Unity.
  18. @property(nonatomic, assign) GADUInterstitialDidFailToReceiveAdWithErrorCallback adFailedCallback;
  19. /// The will present screen callback into Unity.
  20. @property(nonatomic, assign) GADUInterstitialWillPresentScreenCallback willPresentCallback;
  21. /// The did dismiss screen callback into Unity.
  22. @property(nonatomic, assign) GADUInterstitialDidDismissScreenCallback didDismissCallback;
  23. /// The will leave application callback into Unity.
  24. @property(nonatomic, assign) GADUInterstitialWillLeaveApplicationCallback willLeaveCallback;
  25. /// The paid event callback into Unity.
  26. @property(nonatomic, assign) GADUInterstitialPaidEventCallback paidEventCallback;
  27. // Returns the mediation adapter class name.
  28. @property(nonatomic, readonly, copy) NSString *mediationAdapterClassName;
  29. // Returns the interstitial ad response info.
  30. @property(nonatomic, readonly, copy) GADResponseInfo *responseInfo;
  31. /// Makes an ad request. Additional targeting options can be supplied with a request object.
  32. - (void)loadRequest:(GADRequest *)request;
  33. /// Returns YES if the interstitial is ready to be displayed.
  34. - (BOOL)isReady;
  35. /// Shows the interstitial ad.
  36. - (void)show;
  37. @end