Reputation: 1221
I am using Google Interactive Media Ads in my iOS application. It's working good and now I want to use them in my tvOS application. When I add the code for the Google Interactive Media Ads I am getting these issues:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteNotification imaMessage]: unrecognized selector sent to instance 0x7fe4d9e0cb20'
and I am using this code for playing the ad:
- (void)requestAdsPre:(NSString *)url {
self.adPlayerLayer = nil;
//[self.contentPlayer.view removeFromSuperview];
[self setupAdsLoader];
[self setUpAdDisplayContainer];
// Create an ad request with our ad tag, display container, and optional user context.
IMAAdsRequest *request =
[[IMAAdsRequest alloc] initWithAdTagUrl:url
adDisplayContainer:self.adDisplayContainer
userContext:nil];
[self.adsLoader requestAdsWithRequest:request];
}
#pragma mark SDK Setup
- (void)setupAdsLoader {
self.adsLoader = [[IMAAdsLoader alloc] initWithSettings:nil];
self.adsLoader.delegate = self;
}
- (void)setUpAdDisplayContainer {
self.adDisplayContainer =
[[IMAAdDisplayContainer alloc] initWithAdContainer:self.videoView companionSlots:nil];
}
Can anyone tell me how to use Google Interactive Media Ads for tvOS? Google Interactive Media Ads are working for both iOS and tvOS apps.
Upvotes: 1
Views: 989
Reputation: 1
AppleTV(tvOS) Support Google IMA SDK
Check it out here!!!!!!!
https://developers.google.com/interactive-media-ads/docs/sdks/tvos/client-side
Upvotes: 0
Reputation: 18888
Google Interactive Media Ads do not support tvOS.
Currently the IMA SDK does not support tvOS. If this changes, we will make an announcement on our blog and add a note on the release page.
The only tvOS advertising framework I'm aware of at the moment is AppLovin.
Upvotes: 1