MPBaseAdapterConfiguration /5.5.0

@interface MPBaseAdapterConfiguration : NSObject <MPAdapterConfiguration>

Base class for adapter information providers that provides built-in initialization caching support. Subclasses must implement all required fields from the MPAdapterConfiguration protocol.

Public Properties

NSString/adapterVersion /+5.5.0

  • Description: The version of the adapter.

  • Declaration:

    @property (readonly, copy, nonatomic) NSString *_Nonnull adapterVersion;
  • Parameters: None.

NSString/biddingToken /+5.5.0

  • Description: An optional identity token used for ORTB bidding requests required for Advanced Bidding.

  • Declaration:

    @property (readonly, copy, nonatomic, nullable) NSString *biddingToken;
  • Parameters: None.

NSString/moPubNetworkName /+5.5.0

  • Description: MoPub-specific name of the network. This value should correspond to creative_network_name in the dashboard.

  • Declaration:

    @property (readonly, copy, nonatomic) NSString *_Nonnull moPubNetworkName;
  • Parameters: None.

NSString/moPubRequestOptions /+5.5.0

  • Description: Optional dictionary of additional values to send along with every MoPub ad request on behalf of the adapter. This base class will manage this property and will provide accessor methods addMoPubRequestOption:value: to add entries to the options. Overriding this property may cause unintended data loss.

  • Declaration:

    @property (readonly, nonatomic, nullable)
        NSDictionary<NSString *, NSString *> *moPubRequestOptions;
  • Parameters: None.

NSString/networkSdkVersion /+5.5.0

  • Description: The version of the underlying network SDK.

  • Declaration:

    @property (readonly, copy, nonatomic) NSString *_Nonnull networkSdkVersion;
  • Parameters: None.

Public Methods

-/initializeNetworkWithConfiguration:complete: /+5.5.0

  • Description: Initializes the underlying network SDK with a given set of initialization parameters.

  • Declaration:

    - (void)initializeNetworkWithConfiguration:
              (NSDictionary<NSString *, id> *_Nullable)configuration
                                    complete:(void (^_Nullable)(
                                                 NSError *_Nullable))complete;
  • Parameters:

    • configuration: Optional set of JSON-codable configuration parameters that correspond specifically to the network. Only NSString, NSNumber, NSArray, and NSDictionary types are allowed. This value may be nil.

    • complete: Optional completion block that is invoked when the underlying network SDK has completed initialization. This value may be nil. Classes that implement this protocol must account for the possibility of initializeNetworkWithConfiguration:complete: being called multiple times. It is up to each individual adapter to determine whether re-initialization is allowed or not.

-/addMoPubRequestOptions: /+5.5.0

  • Description: Adds entries into the managed moPubRequestOptions dictionary, overwriting any previously set entries.

  • Declaration:

    - (void)addMoPubRequestOptions:
        (nonnull NSDictionary<NSString *, NSString *> *)options;
  • Parameters:

+/setCachedInitializationParameters: /+5.5.0

  • Description: Updates the initialization parameters for the current network.

  • Declaration:

    + (void)setCachedInitializationParameters:
        (NSDictionary<NSString *, id> *_Nullable)parameters;
  • Parameters:

    • parameters: New set of initialization parameters. Only NSString, NSNumber, NSArray, and NSDictionary types are allowed. Nothing will be done if nil is passed in.

+/cachedInitializationParameters /+5.5.0

  • Description: Retrieves the initialization parameters for the current network (if any). This may be nil if not parameters were found.

  • Declaration:

    + (NSDictionary<NSString *, id> *_Nullable)cachedInitializationParameters;
  • Parameters: None.

Last updated August 28, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)