BMPAd

Objective-C

@protocol BMPAd <NSObject, BMPJsonable>

Swift

protocol Ad : BMPJsonable

Defines basic properties available for every ad type

  • Determines whether an ad is linear, i.e. playback of main content needs to be paused for the ad.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isLinear;

    Swift

    var isLinear: Bool { get }

    Return Value

    Whether an ad is linear, i.e. playback of main content needs to be paused for the ad.

  • The width of the ad.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger width;

    Swift

    var width: Int { get set }

    Return Value

    The width of the ad.

  • The height of the ad.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger height;

    Swift

    var height: Int { get set }

    Return Value

    The height of the ad.

  • Identifier for the ad. This might be autogenerated.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSString *identifier;

    Swift

    var identifier: String? { get set }

    Return Value

    The identifier for the ad. This might be autogenerated.

  • The corresponding media file url for the ad.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSURL *mediaFileUrl;

    Swift

    var mediaFileUrl: URL? { get set }

    Return Value

    The corresponding media file url for the ad.

  • The url the user should be redirected to when clicking the ad.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSURL *clickThroughUrl;

    Swift

    var clickThroughUrl: URL? { get set }

    Return Value

    The url the user should be redirected to when clicking the ad.

  • Holds various additional ad data.

    See

    AdData

    Declaration

    Objective-C

    @property (nonatomic, nullable) id<BMPAdData> data;

    Swift

    var data: AdData? { get set }

    Return Value

    Various additional AdData.