MPAdTargeting /5.5.0

@interface MPAdTargeting : NSObject

Optional targeting parameters to use when requesting an ad.

Public Properties

CGSize/creativeSafeSize /+5.8.0

  • Description: The maximum creative size that can be safely rendered in the ad container. The size should be in points.

  • Declaration:

    @property (assign, readwrite, nonatomic) CGSize creativeSafeSize;
    
  • Parameters: None.

NSString/keywords /+5.5.0

  • Description: A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn’t obtain consent from the user, keywords will still be sent to the server.

  • Declaration:

    @property (readwrite, copy, nonatomic) NSString *keywords;
    
  • Parameters: None.

NSDictionary/localExtras /+5.5.0

  • Description: Key-value pairs that are locally available to the mediation adapter.

  • Declaration:

    @property (readwrite, copy, nonatomic) NSDictionary *localExtras /+5.5.0;
    
  • Parameters: None.

CLLocation/location /+5.5.0-5.12.0

  • Description: Deprecated as of release 5.12.0. The location is set automatically based on GPS or Network provider value.

  • Declaration:

    @property (readwrite, copy, nonatomic) CLLocation *location;
    
  • Parameters: None.

NSString/userDataKeywords /+5.5.0

  • Description: A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. Keywords are typically used to target ad campaigns at specific user segments. They should be formatted as comma-separated key-value pairs (for example, marital:single,age:24). Refer to our documentation about keyword targeting options. If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn’t obtain consent from the user, userDataKeywords will not be sent to the server.

  • Declaration:

    @property (readwrite, copy, nonatomic) NSString *userDataKeywords;
    
  • Parameters: None.

Public Methods

-/initWithCreativeSafeSize: /+5.8.0

  • Description: Initializes ad targeting information.

  • Declaration:

    - (instancetype)initWithCreativeSafeSize:(CGSize)size;
    
  • Parameters:

    • size: The maximum creative size that can be safely rendered in the ad container. The size should be in points.

+/targetingWithCreativeSafeSize: /+5.8.0

  • Description: Initializes ad targeting information.

  • Declaration:

    + (instancetype)targetingWithCreativeSafeSize:(CGSize)size;
    
  • Parameters:

    • size: The maximum creative size that can be safely rendered in the ad container. The size should be in points.

Last updated July 10, 2020

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.

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