GADMRewardBasedVideoAdNetworkAdapter

@protocol GADMRewardBasedVideoAdNetworkAdapter <NSObject>

Your adapter must conform to this protocol to provide reward based video ads.

  • Returns a version string for the adapter. It can be any string that uniquely identifies the version of your adapter. For example, 1.0, or simply a date such as 20110915.

    Declaration

    Swift

    static func adapterVersion() -> String!

    Objective-C

    + (NSString *)adapterVersion;
  • The extras class that is used to specify additional parameters for a request to this ad network. Returns Nil if the network does not have extra settings for publishers to send.

    Declaration

    Swift

    static func networkExtrasClass() -> GADAdNetworkExtras.Type!

    Objective-C

    + (Class<GADAdNetworkExtras>)networkExtrasClass;
  • Returns an initialized instance of the adapter when mediation ad requests come in. The adapter must only maintain a weak reference to the provided connector.

    Declaration

    Swift

    init!(rewardBasedVideoAdNetworkConnector connector: GADMRewardBasedVideoAdNetworkConnector!)

    Objective-C

    - (instancetype)initWithRewardBasedVideoAdNetworkConnector:
        (id<GADMRewardBasedVideoAdNetworkConnector>)connector;
  • Tells the adapter to set up reward based video ads. The adapter should notify the Google Mobile Ads SDK whether set up has succeeded or failed using callbacks provided in the connector. When set up fails, the Google Mobile Ads SDK may try to set up the adapter again.

    Declaration

    Swift

    func setUp()

    Objective-C

    - (void)setUp;
  • Tells the adapter to request a reward based video ad. This method is called after the adapter has been set up. The adapter should notify the Google Mobile Ads SDK if the request succeeds or fails using callbacks provided in the connector.

    Declaration

    Swift

    func requestRewardBasedVideoAd()

    Objective-C

    - (void)requestRewardBasedVideoAd;
  • Tells the adapter to present the reward based video ad with the provided view controller. This method is only called after the adapter successfully requested an ad.

    Declaration

    Swift

    func presentRewardBasedVideoAd(withRootViewController viewController: Any!)

    Objective-C

    - (void)presentRewardBasedVideoAdWithRootViewController:(id)viewController;
  • Tells the adapter to remove itself as a delegate or notification observer from the underlying ad network SDK.

    Declaration

    Swift

    func stopBeingDelegate()

    Objective-C

    - (void)stopBeingDelegate;
  • Adapters that want to be initialized as early as possible should implement this method to opt-into initialization when the publisher initializes the Google Mobile Ads SDK. If not implemented, initWithRewardBasedVideoAdNetworkConnector: gets called the first time the publisher loads a rewarded video ad.

    Declaration

    Swift

    init!(rewardBasedVideoAdNetworkConnector connector: GADMRewardBasedVideoAdNetworkConnector!, credentials: [[AnyHashable : Any]]!)

    Objective-C

    - (instancetype)initWithRewardBasedVideoAdNetworkConnector:
                        (id<GADMRewardBasedVideoAdNetworkConnector>)connector
                                                   credentials:
                                                       (NSArray<NSDictionary *> *)
                                                           credentials;
  • Returns an initialized instance of the adapter. The adapter must only maintain a weak reference to the provided connector.

    Declaration

    Swift

    init!(gadmAdNetworkConnector connector: GADMRewardBasedVideoAdNetworkConnector!)

    Objective-C

    - (instancetype)initWithGADMAdNetworkConnector:
        (id<GADMRewardBasedVideoAdNetworkConnector>)connector;
  • Tells the adapter to set up reward based video ads with the provided user ID. The adapter should notify the Google Mobile Ads SDK whether set up has succeeded or failed using callbacks provided in the connector. When set up fails, the Google Mobile Ads SDK may try to set up the adapter again.

    Declaration

    Swift

    optional func setUpWithUserID(_ userID: String!)

    Objective-C

    - (void)setUpWithUserID:(NSString *)userID;