【问题标题】:Google AdMobs Xamarin CrossPlatformGoogle AdMobs Xamarin 跨平台
【发布时间】:2020-09-12 19:32:16
【问题描述】:

我正在开发一个跨平台应用程序并尝试实现 google ad mobs,但 google 和 firebase 不包含 Xamarin 的说明列表,仅适用于 Swift。有什么想法最好添加广告吗?

谢谢!

【问题讨论】:

  • 如果你 google google admobs xamarin 教程,你会发现很多例子,如 Xamarin Forms Integration with Google AdmobAdMob-Xamarin.Forms
  • 让我看看 nuget 包是否有效,因为我尝试过的每个教程最近都被弃用了,这非常令人沮丧。
  • 试一试,如果它对你有用,你可以在这里分享解决方案:)

标签: firebase xamarin cross-platform ads


【解决方案1】:

遵循这些教程中的任何一个都可以。只需更改 iOS 代码,在 AppDelegate 中为

`MobileAds.Configure("您的应用 ID");

Firebase.Core.App.Configure(); MobileAds.SharedInstance.Start(completionHandler); MobileAds.SharedInstance.RequestConfiguration.TestDeviceIdentifiers = new string[] {"kGADSimulatorID", "Your Device ID" };`

要查找您的设备 ID,请将测试设备标识符留空,控制台会将其显示给您。

【讨论】:

  • 好的,你可以稍后标记这个答案,这将帮助更多有同样问题的人。
猜你喜欢
  • 1970-01-01
  • 2018-10-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-12-04
  • 2018-04-03
相关资源
最近更新 更多