GoogleInteractiveMediaAds Framework Reference

IMAAd

@interface IMAAd : NSObject

Data object representing a single ad.

  • The ad ID as specified in the VAST response.

    Declaration

    Swift

    var adId: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull adId;
  • The ad title from the VAST response.

    Declaration

    Swift

    var adTitle: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull adTitle;
  • The ad description.

    Declaration

    Swift

    var adDescription: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull adDescription;
  • The source ad server information included in the ad response.

    Declaration

    Swift

    var adSystem: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull adSystem;
  • The companion ads specified in the VAST response when using DAI. Empty for client-side ads.

    Declaration

    Swift

    var companionAds: [IMACompanionAd] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<IMACompanionAd *> *_Nonnull companionAds;
  • Content type of the currently selected creative. For linear creatives returns the content type of the currently selected media file. Returns empty string if no creative or media file is selected on this ad.

    Declaration

    Swift

    var contentType: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull contentType;
  • The duration of the ad from the VAST response.

    Declaration

    Swift

    var duration: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval duration;
  • The UI elements that will be displayed during ad playback.

    Declaration

    Swift

    var uiElements: [NSNumber] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<NSNumber *> *_Nonnull uiElements;
  • The width of the ad asset. For non-linear ads, this is the actual width of the ad representation. For linear ads, since they scale seamlessly, we currently return 0 for width.

    Declaration

    Swift

    var width: Int { get }

    Objective-C

    @property (nonatomic, readonly) NSInteger width;
  • The height of the ad asset. For non-linear ads, this is the actual height of the ad representation. For linear ads, since they scale seamlessly, we currently return 0 for height.

    Declaration

    Swift

    var height: Int { get }

    Objective-C

    @property (nonatomic, readonly) NSInteger height;
  • The width of the selected creative as specified in the VAST response.

    Declaration

    Swift

    var vastMediaWidth: Int { get }

    Objective-C

    @property (nonatomic, readonly) NSInteger VASTMediaWidth;
  • The height of the selected creative as specified in the VAST response.

    Declaration

    Swift

    var vastMediaHeight: Int { get }

    Objective-C

    @property (nonatomic, readonly) NSInteger VASTMediaHeight;
  • The bitrate of the selected creative as specified in the VAST response.

    Declaration

    Swift

    var vastMediaBitrate: Int { get }

    Objective-C

    @property (nonatomic, readonly) NSInteger VASTMediaBitrate;
  • Specifies whether the ad is linear or non-linear.

    Declaration

    Swift

    var isLinear: Bool { get }

    Objective-C

    @property (nonatomic, readonly, getter=isLinear) BOOL linear;
  • Specifies whether the ad is skippable.

    Declaration

    Swift

    var isSkippable: Bool { get }

    Objective-C

    @property (nonatomic, readonly, getter=isSkippable) BOOL skippable;
  • The number of seconds of playback before the ad becomes skippable. -1 is returned for non skippable ads or if this is unavailable.

    Declaration

    Swift

    var skipTimeOffset: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval skipTimeOffset;
  • Set of ad podding properties.

    Declaration

    Swift

    var adPodInfo: IMAAdPodInfo { get }

    Objective-C

    @property (nonatomic, readonly) IMAAdPodInfo *_Nonnull adPodInfo;
  • String representing custom trafficking parameters from the VAST response.

    Declaration

    Swift

    var traffickingParameters: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull traffickingParameters;
  • Returns the ID of the selected creative for the ad.

    Declaration

    Swift

    var creativeID: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull creativeID;
  • Returns the ISCI (Industry Standard Commercial Identifier) code for an ad. This is the Ad-ID of the selected creative in the VAST response.

    Declaration

    Swift

    var creativeAdID: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull creativeAdID;
  • The list of all UniversalAdIds of the selected creative for this ad. Returns an empty array if no universal ad IDs are found.

    Declaration

    Swift

    var universalAdIDs: [IMAUniversalAdID] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<IMAUniversalAdID *> *_Nonnull universalAdIDs;
  • The UniversalAdId of the selected creative for the ad. Returns the id value or “unknown” if unavailable.

    Declaration

    Swift

    var universalAdIdValue: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) DEPRECATED_MSG_ATTRIBUTE("Use universalAdIDs instead.") NSString *universalAdIdValue;
  • The registry associated with cataloging the UniversalAdId of the selected creative for the ad. Returns the registry value, or “unknown” if unavailable.

    Declaration

    Swift

    var universalAdIdRegistry: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) DEPRECATED_MSG_ATTRIBUTE("Use universalAdIDs instead.") NSString *universalAdIdRegistry;
  • The advertiser name as defined by the serving party.

    Declaration

    Swift

    var advertiserName: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull advertiserName;
  • Returns the URL associated with the survey for the given ad.

    Declaration

    Swift

    var surveyURL: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *surveyURL;
  • Returns the first deal ID present in the wrapper chain for the current ad, starting from the top.

    Declaration

    Swift

    var dealID: String { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull dealID;
  • The IDs of the ads, starting with the first wrapper ad.

    Declaration

    Swift

    var wrapperAdIDs: [String] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<NSString *> *_Nonnull wrapperAdIDs;
  • The IDs of the ads’ creatives, starting with the first wrapper ad.

    Declaration

    Swift

    var wrapperCreativeIDs: [String] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<NSString *> *_Nonnull wrapperCreativeIDs;
  • Ad systems used for wrapper ads. The ad systems returned begin with the first wrapper ad and continue to each wrapper ad recursively.

    Declaration

    Swift

    var wrapperSystems: [String] { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSArray<NSString *> *_Nonnull wrapperSystems;