1

我在我的 iOS 应用程序中使用 Google 互动媒体广告。它运行良好,现在我想在我的 tvOS 应用程序中使用它们。当我为 Google 互动媒体广告添加代码时,我遇到了以下问题:

由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[NSConcreteNotification imaMessage]:无法识别的选择器发送到实例 0x7fe4d9e0cb20”

我正在使用此代码播放广告:

- (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];
}

谁能告诉我如何在 tvOS 上使用 Google 互动媒体广告?Google 互动媒体广告适用于 iOS 和 tvOS 应用。

4

1 回答 1

1

Google 互动媒体广告不支持 tvOS

目前 IMA SDK 不支持 tvOS。如果这种情况发生变化,我们将在我们的博客上发布公告,并在发布页面上添加注释。

目前我知道的唯一 tvOS 广告框架是AppLovin

于 2016-05-09T11:31:11.197 回答