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.
Google Interactive Media Ads do not support tvOS.
The only tvOS advertising framework I'm aware of at the moment is AppLovin.