GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMAAdsRenderingSettings
@interface IMAAdsRenderingSettings : NSObject
Set of properties that influence how ads are rendered.
-
If specified, the SDK will play the media with MIME type on the list.
List of strings specifying the MIME types. When empty, the SDK will
use its default list of MIME types supported on iOS.
Example: @[ @“video/mp4”, @“application/x-mpegURL” ]
The property is an empty array by default.
Declaration
Swift
var mimeTypes: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *mimeTypes;
-
Maximum recommended bitrate. The value is in kbit/s.
SDK will pick media with bitrate below the specified max, or the closest
bitrate if there is no media with smaller bitrate found.
Default value, |kIMAAutodetectBitrate|, means the bitrate will be selected
by the SDK, using the currently detected network speed (cellular or Wi-Fi).
Declaration
Swift
var bitrate: Int { get set }
Objective-C
@property (nonatomic) NSInteger bitrate;
-
Timeout (in seconds) when loading a video ad media file. If loading takes
longer than this timeout, the ad playback is canceled and the next ad in the
pod plays, if available. Use -1 for the default of 8 seconds.
Declaration
Swift
var loadVideoTimeout: TimeInterval { get set }
Objective-C
@property (nonatomic) NSTimeInterval loadVideoTimeout;
-
For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds).
This setting is strictly after the specified time. For example, setting playAdsAfterTime to
15 will ignore an ad break scheduled to play at 15s.
Declaration
Swift
var playAdsAfterTime: TimeInterval { get set }
Objective-C
@property (nonatomic) NSTimeInterval playAdsAfterTime;
-
Specifies the list of UI elements that should be visible.
This property may be ignored for AdSense/AdX ads. For valid values, see
IMAUiElementType. This field
is ignored on tvOS, where UI elements are unavailable.
Declaration
Swift
var uiElements: [NSNumber]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSNumber *> *uiElements;
-
Whether or not the SDK will preload ad media. Default is YES.
Declaration
Swift
var enablePreloading: Bool { get set }
Objective-C
@property (nonatomic) BOOL enablePreloading;
-
Specifies the optional UIViewController that the SDK uses to present an in-app browser or app
store. When nil, tapping the video ad “Learn More” button or companion ads results in opening a
Safari browser. Setting this allows the SDK to open links in-app. This field is ignored on tvOS,
where Safari is not available. If provided, the SDK presents the app store in this view
controller for SKAdNetwork ads. If left nil, it is presented in the view controller provided
to the ad display container.
Declaration
Swift
weak var linkOpenerPresentingController: UIViewController? { get set }
Objective-C
@property (nonatomic, weak, nullable) UIViewController *linkOpenerPresentingController;
-
The IMALinkOpenerDelegate to be notified when a link is opened/closed.
SKAdNetwork and web links are unavailable on tvOS, but this delegate is
used to notify for deep links.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMAAdsRenderingSettings\u003c/code\u003e allows publishers to customize how ads are displayed within their content.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can specify preferred MIME types and bitrate for ad media playback.\u003c/p\u003e\n"],["\u003cp\u003eTimeouts, preloading behavior, and the display of UI elements during ad playback are configurable.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to customize ad break scheduling and link opening actions.\u003c/p\u003e\n"],["\u003cp\u003eThe settings provide control over the user experience and ad behavior, ensuring smoother integration.\u003c/p\u003e\n"]]],[],null,["IMAAdsRenderingSettings \n\n @interface IMAAdsRenderingSettings : NSObject\n\nSet of properties that influence how ads are rendered.\n- `\n ``\n ``\n `\n\n [mimeTypes](#/c:objc(cs)IMAAdsRenderingSettings(py)mimeTypes)`\n ` \n If specified, the SDK will play the media with MIME type on the list.\n List of strings specifying the MIME types. When empty, the SDK will\n use its default list of MIME types supported on iOS.\n Example: @\\[ @\"video/mp4\", @\"application/x-mpegURL\" \\]\n The property is an empty array by default. \n\n Declaration \n Swift \n\n var mimeTypes: [String]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSString *\u003e *mimeTypes;\n\n- `\n ``\n ``\n `\n\n [bitrate](#/c:objc(cs)IMAAdsRenderingSettings(py)bitrate)`\n ` \n Maximum recommended bitrate. The value is in kbit/s.\n SDK will pick media with bitrate below the specified max, or the closest\n bitrate if there is no media with smaller bitrate found.\n Default value, \\|kIMAAutodetectBitrate\\|, means the bitrate will be selected\n by the SDK, using the currently detected network speed (cellular or Wi-Fi). \n\n Declaration \n Swift \n\n var bitrate: Int { get set }\n\n Objective-C \n\n @property (nonatomic) NSInteger bitrate;\n\n- `\n ``\n ``\n `\n\n [loadVideoTimeout](#/c:objc(cs)IMAAdsRenderingSettings(py)loadVideoTimeout)`\n ` \n Timeout (in seconds) when loading a video ad media file. If loading takes\n longer than this timeout, the ad playback is canceled and the next ad in the\n pod plays, if available. Use -1 for the default of 8 seconds. \n\n Declaration \n Swift \n\n var loadVideoTimeout: TimeInterval { get set }\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval loadVideoTimeout;\n\n- `\n ``\n ``\n `\n\n [playAdsAfterTime](#/c:objc(cs)IMAAdsRenderingSettings(py)playAdsAfterTime)`\n ` \n For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds).\n This setting is strictly after the specified time. For example, setting playAdsAfterTime to\n 15 will ignore an ad break scheduled to play at 15s. \n\n Declaration \n Swift \n\n var playAdsAfterTime: TimeInterval { get set }\n\n Objective-C \n\n @property (nonatomic) NSTimeInterval playAdsAfterTime;\n\n- `\n ``\n ``\n `\n\n [uiElements](#/c:objc(cs)IMAAdsRenderingSettings(py)uiElements)`\n ` \n Specifies the list of UI elements that should be visible.\n This property may be ignored for AdSense/AdX ads. For valid values, see\n [IMAUiElementType](../Enums/IMAUiElementType.html). This field\n is ignored on tvOS, where UI elements are unavailable. \n\n Declaration \n Swift \n\n var uiElements: [NSNumber]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSNumber *\u003e *uiElements;\n\n- `\n ``\n ``\n `\n\n [enablePreloading](#/c:objc(cs)IMAAdsRenderingSettings(py)enablePreloading)`\n ` \n Whether or not the SDK will preload ad media. Default is YES. \n\n Declaration \n Swift \n\n var enablePreloading: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL enablePreloading;\n\n- `\n ``\n ``\n `\n\n [linkOpenerPresentingController](#/c:objc(cs)IMAAdsRenderingSettings(py)linkOpenerPresentingController)`\n ` \n Specifies the optional UIViewController that the SDK uses to present an in-app browser or app\n store. When nil, tapping the video ad \"Learn More\" button or companion ads results in opening a\n Safari browser. Setting this allows the SDK to open links in-app. This field is ignored on tvOS,\n where Safari is not available. If provided, the SDK presents the app store in this view\n controller for SKAdNetwork ads. If left nil, it is presented in the view controller provided\n to the ad display container. \n\n Declaration \n Swift \n\n weak var linkOpenerPresentingController: UIViewController? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) UIViewController *linkOpenerPresentingController;\n\n- `\n ``\n ``\n `\n\n [linkOpenerDelegate](#/c:objc(cs)IMAAdsRenderingSettings(py)linkOpenerDelegate)`\n ` \n The IMALinkOpenerDelegate to be notified when a link is opened/closed.\n SKAdNetwork and web links are unavailable on tvOS, but this delegate is\n used to notify for deep links. \n\n Declaration \n Swift \n\n weak var linkOpenerDelegate: (any ../Protocols/IMALinkOpenerDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/IMALinkOpenerDelegate.html\u003e linkOpenerDelegate;"]]