GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMACompanionAd
@interface IMACompanionAd : NSObject
An object that holds data corresponding to the companion ad.
-
The value for the resource of this companion.
Declaration
Swift
var resourceValue: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *resourceValue;
-
The API needed to execute this ad, or nil if unavailable.
Declaration
Swift
var apiFramework: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *APIFramework;
-
The width of the companion in pixels. 0 if unavailable.
Declaration
Swift
var width: Int { get }
Objective-C
@property (nonatomic, readonly) NSInteger width;
-
The height of the companion in pixels. 0 if unavailable.
Declaration
Swift
var height: Int { get }
Objective-C
@property (nonatomic, readonly) NSInteger height;
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-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMACompanionAd\u003c/code\u003e is an object that stores data related to a companion ad, such as its resource, dimensions, and required API framework.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties like \u003ccode\u003eresourceValue\u003c/code\u003e, \u003ccode\u003eAPIFramework\u003c/code\u003e, \u003ccode\u003ewidth\u003c/code\u003e, and \u003ccode\u003eheight\u003c/code\u003e to access the companion ad's information.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewidth\u003c/code\u003e and \u003ccode\u003eheight\u003c/code\u003e properties represent the dimensions of the companion ad in pixels and are 0 if unavailable.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eresourceValue\u003c/code\u003e to get the ad's resource and \u003ccode\u003eAPIFramework\u003c/code\u003e to determine the API needed for execution.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMACompanionAd\n==============\n\n @interface IMACompanionAd : NSObject\n\nAn object that holds data corresponding to the companion ad.\n- `\n ``\n ``\n `\n\n ### [resourceValue](#/c:objc(cs)IMACompanionAd(py)resourceValue)\n\n `\n ` \n The value for the resource of this companion. \n\n #### Declaration\n\n Swift \n\n var resourceValue: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *resourceValue;\n\n- `\n ``\n ``\n `\n\n ### [APIFramework](#/c:objc(cs)IMACompanionAd(py)APIFramework)\n\n `\n ` \n The API needed to execute this ad, or nil if unavailable. \n\n #### Declaration\n\n Swift \n\n var apiFramework: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *APIFramework;\n\n- `\n ``\n ``\n `\n\n ### [width](#/c:objc(cs)IMACompanionAd(py)width)\n\n `\n ` \n The width of the companion in pixels. 0 if unavailable. \n\n #### Declaration\n\n Swift \n\n var width: Int { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSInteger width;\n\n- `\n ``\n ``\n `\n\n ### [height](#/c:objc(cs)IMACompanionAd(py)height)\n\n `\n ` \n The height of the companion in pixels. 0 if unavailable. \n\n #### Declaration\n\n Swift \n\n var height: Int { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSInteger height;"]]