Review client-side upgrade
Stay organized with collections
Save and categorize content based on your preferences.
The Client-side tvOS SDK has changed very little with the v4 release. The
primary change is the addition of IMAAdDisplayContainer
, as seen in the iOS
SDK.
This guide walks through the process required to upgrade an existing v3
implementation to the new v4 SDK.
Change the module name
To match the iOS SDK, we've changed the module name from
ClientSideInteractiveMediaAds
to GoogleInteractiveMediaAds
, so you should
make the following changes.
Changes |
Old |
#import <ClientSideInteractiveMediaAds/ClientSideInteractiveMediaAds.h>
@import ClientSideInteractiveMediaAds;
|
New |
#import <GoogleInteractiveMediaAds/GoogleInteractiveMediaAds.h>
@import GoogleInteractiveMediaAds;
|
Create the new ad container
Create and pass in an IMAAdDisplayContainer |
Old |
IMAAdsRequest *adsRequest =
[[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString
adDisplayContainer:self.videoView
contentPlayhead:self.contentPlayhead
userContext:userContext];
|
New |
self.adDisplayContainer =
[[IMAAdDisplayContainer alloc] initWithAdContainer:self.videoView];
IMAAdsRequest *adsRequest =
[[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString
adDisplayContainer:self.adDisplayContainer
contentPlayhead:self.contentPlayhead
userContext:userContext];
|
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-01 UTC.
[null,null,["Last updated 2025-08-01 UTC."],[[["\u003cp\u003eThe tvOS SDK v4 introduces \u003ccode\u003eIMAAdDisplayContainer\u003c/code\u003e, aligning it with the iOS SDK.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading from v3 involves changing the module name from \u003ccode\u003eClientSideInteractiveMediaAds\u003c/code\u003e to \u003ccode\u003eGoogleInteractiveMediaAds\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou must now create and utilize an \u003ccode\u003eIMAAdDisplayContainer\u003c/code\u003e when making ad requests.\u003c/p\u003e\n"]]],[],null,["# Review client-side upgrade\n\nThe Client-side tvOS SDK has changed very little with the v4 release. The\nprimary change is the addition of `IMAAdDisplayContainer`, as seen in the iOS\nSDK.\n\nThis guide walks through the process required to upgrade an existing v3\nimplementation to the new v4 SDK.\n\nChange the module name\n----------------------\n\nTo match the iOS SDK, we've changed the module name from\n`ClientSideInteractiveMediaAds` to `GoogleInteractiveMediaAds`, so you should\nmake the following changes.\n\n| Changes ||\n|-----|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Old | ```python #import \u003cClientSideInteractiveMediaAds/ClientSideInteractiveMediaAds.h\u003e ``` ```python @import ClientSideInteractiveMediaAds; ``` |\n| New | ```python #import \u003cGoogleInteractiveMediaAds/GoogleInteractiveMediaAds.h\u003e ``` ```python @import GoogleInteractiveMediaAds; ``` |\n\nCreate the new ad container\n---------------------------\n\n| Create and pass in an IMAAdDisplayContainer ||\n|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Old | ```objective-c IMAAdsRequest *adsRequest = [[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString adDisplayContainer:self.videoView contentPlayhead:self.contentPlayhead userContext:userContext]; ``` |\n| New | ```objective-c self.adDisplayContainer = [[IMAAdDisplayContainer alloc] initWithAdContainer:self.videoView]; IMAAdsRequest *adsRequest = [[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString adDisplayContainer:self.adDisplayContainer contentPlayhead:self.contentPlayhead userContext:userContext]; ``` |"]]