Google 集成
支持的广告格式
集成
Android
iOS
-
在 Yandex Advertising Network 界面及其他网络界面中 设置聚合。
-
在应用级 build.gradle.kts 文件的
androidMain.dependencies块中添加以下依赖项:implementation("com.yandex.android:mobileads:8.0.0") implementation("com.yandex.ads.mediation:mobileads-google:24.9.0.0") -
Add your
AdMob IDto your app's AndroidManifest.xml file using the<meta-data>tag namedcom.google.android.gms.ads.APPLICATION_ID(learn more about how to find the AdMob ID).<manifest> <application> ... <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/> ... </application> </manifest>
备注
要在移动聚合中跟踪应用安装,您需要为适配器配置 Info.plist。请按照广告网络 文档 进行操作。
要使用 Google,您需要添加 GoogleYandexMobileAdsAdapters 库。
GoogleYandexMobileAdsAdapters 库已进行了修改。它现在可与 CocoaPods 依赖管理系统进行互操作并支持静态集成方法。
-
在 Yandex Advertising Network 界面和其他网络界面中 设置聚合。
-
要连接库,请将依赖项添加到项目的 Podfile 中:
pod 'GoogleYandexMobileAdsAdapters', '12.14.0.0' -
在应用的 Info.plist 文件中,添加字符串值为
AdMob ID的GADApplicationIdentifier键(详细了解如何 查找 AdMob ID)。<key>GADApplicationIdentifier</key> <string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
这篇文章是否有用?
上一篇
下一篇