Ios Google Admob横幅广告未加载AnchorType.top
我在安卓商店上发布了一个Flutter应用程序。一切都是功能齐全的,包括横幅广告。我现在正试图让应用程序的苹果端正常工作,并一直在努力解决阻碍这一过程的无数苹果漏洞 我现在无法解决的是横幅广告。它们根本不会出现在iphone上。我遵循了本官方指南中的所有内容: 我已将Info.plist中的GADApplicationIdentifier设置为Admob中我的应用程序的应用程序ID 我在Info.plist中添加了GADIsAdManagerApp,并将其设置为YES 我在Info.plist中添加了io.flatter.embedded_views_preview并将其设置为YES 我已经从门户网站下载了一个最新的GoogleService-info.plist文件,并将其添加到我的应用程序的runner文件夹中,但即使完成了所有这些步骤,我还是得到了: 也没有其他可能提供失败原因线索的信息 我的横幅代码(在Android中运行良好): 使用此设置,广告将完全无法在IOS上加载。如果我将此设置为底部,则广告加载完全正常。看起来像是又一个可怕的IOS错误,但我不知道如何解决这个问题,记住我需要在屏幕顶部显示横幅Ios Google Admob横幅广告未加载AnchorType.top,ios,flutter,banner-ads,Ios,Flutter,Banner Ads,我在安卓商店上发布了一个Flutter应用程序。一切都是功能齐全的,包括横幅广告。我现在正试图让应用程序的苹果端正常工作,并一直在努力解决阻碍这一过程的无数苹果漏洞 我现在无法解决的是横幅广告。它们根本不会出现在iphone上。我遵循了本官方指南中的所有内容: 我已将Info.plist中的GADApplicationIdentifier设置为Admob中我的应用程序的应用程序ID 我在Info.plist中添加了GADIsAdManagerApp,并将其设置为YES 我在Info.plist中
有没有其他方法可以在不使用anchortype的情况下实现此定位???屏幕截图: 如果您使用的是
AnchorType.top
请尝试以下操作:
myBanner
..load()
..show(
anchorOffset: kToolbarHeight + 50, // 50 is the height of the banner ad
anchorType: AnchorType.top, // it should work now because we have added offset
);
myBanner
..load()
..show(
// it makes sure we are right below the AppBar, 50 is the height of Banner ad
anchorOffset: queryData.size.height - kToolbarHeight - 50 - queryData.padding.top - queryData.padding.bottom,
anchorType: AnchorType.bottom,
);
如果您使用的是
AnchorType.bottom
请尝试以下操作:
myBanner
..load()
..show(
anchorOffset: kToolbarHeight + 50, // 50 is the height of the banner ad
anchorType: AnchorType.top, // it should work now because we have added offset
);
myBanner
..load()
..show(
// it makes sure we are right below the AppBar, 50 is the height of Banner ad
anchorOffset: queryData.size.height - kToolbarHeight - 50 - queryData.padding.top - queryData.padding.bottom,
anchorType: AnchorType.bottom,
);
测试(包括纵向和横向)
- iPhone XS模拟器
- iphone6s真实设备
应用程序栏的上方,我添加了一个解决方案来修复它。