问题标签 [googlemobileads]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
1719 浏览

ios - 为什么 Xcode 没有从用于 Google 移动广告 SDK 的 info.plist 中获取 GADApplicationIdentifier?

在尝试了所有可能的方法来解决我面临的问题后,我问了这个问题。首先,让我们看看这个错误,我会告诉我我做了什么来解决它,但不幸的是,没有什么对我真正有用。

因此,我使用 cocoaPod 导入了 Google Mobile AD sdk。在 AppDelegate 中添加了以下行:

以及 info.plist 中的以下内容:

但是,该应用程序不断抛出以下错误:

我尝试导入 Firebase,但仍然无法解决问题。

0 投票
2 回答
1100 浏览

swift - SwiftUI:Admob 插页式广告未在 rootViewController 上呈现

用 SWIFTUI 编码

我在我的 SwiftUI 应用程序中实现了一个设置页面,该页面在单击视图中的按钮时显示。这个视图被包裹在一张纸中。你可以看到下面的代码:

我在此“OptionsTab”中实现了一个插页式广告,该插页式广告是在 .onAppear() 调用中加载选项选项卡时创建的,并在选择后退按钮时显示。您可以从下面的 OptionsTab 中获取代码:

我在记录插页式广告状态的按钮中有额外的代码,它显示它已准备好,并且当前代码正在被点击......但它永远不会出现。

我已经在 ContentView 中实现了这个确切的代码,并且插页式加载非常好。工作表中有关此代码的某些内容导致插页式广告不显示。

在从工作表呈现的视图中,rootViewController 是否是加载插页式广告的不正确视图?否则,我还做错了什么?

我在这里先向您的帮助表示感谢!

0 投票
1 回答
47 浏览

ios - iOS 应用程序在升级 POD 'Google-Mobile-Ads-SDK' 后终止。崩溃日志显示 - “GADMediaContent setDelegate”无法识别选择器

很长一段时间我都在使用“pod 'Google-Mobile-Ads-SDK' 7.32.0”。但现在我必须升级它,但发现以下崩溃,崩溃日志说 - “GADMediaContent setDelegate”无法识别选择器。

0 投票
1 回答
817 浏览

ios - 更新适用于 iOS 的 Google-Mobile-Ads-SDK 时出现问题

我想更新 Google-Mobile-Ads-SDK pod 以删除 UIWebView 的实例,但根据文档链接,需要将一个GADApplicationIdentifier必须添加到 Info.plist 文件中才能正确初始化 SDK . 我没有 admob 帐户,我只使用 Ad-Manager 在应用中展示原生广告。有没有其他方法可以在不添加GADApplicationIdentifierInfo.plist的情况下更新 SDK

0 投票
1 回答
426 浏览

android - Google Mobiles Ads Creative Preview not working

I am new to Mobile Ads. I am loading an Ad in PublisherAdView. I am successfully able to load Ad as I am getting the callback in onAdLoaded().

The following are the logs that say Ad load successfully.

However, whenever I preview a creative I am getting an error. Since I am not much experienced in this I don't understand this exactly. And could not find related resources now after spending a day on this.

I have followed: https://developers.google.com/ad-manager/mobile-ads-sdk/android/debug https://support.google.com/admanager/answer/7160685#push

My device is already linked and pushing the creative from Google Ad Manager console doesn't work for me. This is the error I am getting. I am hoping many of us from the developer community might have faced this earlier.

The initialization process works fine:

Dependency:


Device already linked Device already linked

Opening the debug menu to preview creative Opening debug menu to preview creative

Unknown Error Unknown Error

Let me know if there are any details I am missing out or any tag to add to this question for better reach.

I have created a thread on Google Support: https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/Xs1HtsT2934

Here is a sample and video for the same: Sample: https://drive.google.com/file/d/1F2wBFofHTPlZxs9VUb0KOArjNTFItcqj/view?usp=sharing Video: https://drive.google.com/file/d/1ZKY_2kui8X-OuErJUQdzqZLcrMcpyFRC/view?usp=sharing

0 投票
1 回答
270 浏览

swift - GoogleMobileAds 网页视图

有谁知道为什么GoogleMobileAds还在UIWebView里面?我安装了最新版本,GoogleMobileAds (7.60.0)但是当我运行它时grep -r UIWebView Pods/检测到GoogleMobileAdsUIWebView

如果我在这里阅读了GoogleMobileAds已删除UIWebView自版本以来的所有引用的文档,7.55.0那么为什么它仍然出现?

我试过重装,pod deintegrate还是pod updateUIWebView

截屏

0 投票
2 回答
1272 浏览

swift - 如何在 SwiftUI 中使用 Google Mobile Ads SDK,或在 SwiftUI 视图中使用 UIKit UIViewController?

我有一个 SwiftUI 视图,我想在按下按钮时从 Google 移动广告 SDK 打开一个奖励广告。加载广告的说明 ( https://developers.google.com/admob/ios/rewarded-ads#create_rewarded_ad ) 在 UIKit 中,我很难在我的 SwiftUI 应用程序中使用它们。有没有办法使用 SwiftUI 加载广告,或者如果我使用 UIKit,我如何将它集成到 SwiftUI 中?

这是 SwiftUI 父视图:

我不知道 UIKit,但我认为这是我想在 SwiftUI 中使用的代码:

0 投票
1 回答
159 浏览

android - Google Ads 中介的自定义事件未调用收益合作伙伴定义的类 - CustomEventAdapter

我将自定义 adUnitId 添加到我的 PublisherAdView 横幅广告,由发布者提供,以触发 Google 移动广告 SDK 调用我的自定义事件处理程序类,但我收到此错误消息:

这是MyCustomBannerAdapter

在我的活动中,我已经像这样导入了MyCustomBannerAdapter:

构建梯度

安卓清单

我正在关注官方的 Google 移动广告 SDK文档

https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start

知道如何触发调用 MyCustomBannerAdapter 吗?

0 投票
1 回答
52 浏览

ios - IOS 应用中横幅广告顶部和底部的黑条

我刚刚在 IOS 应用程序中集成了横幅广告。我使用了一个名为“adContainerView”的容器视图,当广告准备就绪时,我将 GADBannerView 实例添加到 adContainerView。

加载横幅广告的代码片段是

当广告在下面加载时,事件被调用,我将 adContainerView 视图的高度和宽度设置为广告尺寸。

但是,广告有时会奇怪地出现。它有时如下所示,这是我所期待的预期的广告外观

当我来回访问同一页面时,它随机显示如下。e没想到会这样

我想了解为什么我会在广告视图的顶部和底部看到黑条。adContainerView 采用 GDBannerView 的确切大小,它是 adContainerView 的子级。因此,从技术上讲,它不应该在广告的顶部和底部显示暗条。

为什么会发生这种情况的任何指示。

0 投票
1 回答
112 浏览

android - 如何使用谷歌广告管理器通过移动应用获利

我正在开发一个移动应用程序,为了获利,当我使用测试广告单元 ID (/6499/example/banner) 测试横幅和插页式广告时,我选择了谷歌广告管理器,它显示测试广告,但是当我使用我的广告单元 ID (/ xxxxxxx/xxxxxx) 它没有上升。