jjzjj

ADBannerView

全部标签

swift - 在 Swift 中单击 iAd 时暂停 SpriteKit 场景

我正在我的游戏中实现横幅广告。在@erdekhayser的帮助下,横幅成功显示。但是当我点击横幅时,游戏不会暂停。代码如下所示:importUIKitimportSpriteKitimportiAdimportFoundationclassGameViewController:UIViewController,ADBannerViewDelegate{vargameScene=GameScene()varadBannerView=ADBannerView(frame:CGRect.zeroRect)funcloadAds(){adBannerView.center=CGPoint(x:

swift - Autolayout 不同于 iOS 7 和 iOS 8

我在IB中创建的iAdBannerView及其约束之间遇到问题。我有一个IBOutlet用于带有superView的iAdBannerView的底部约束。在ViewController的viewDidLoad()中,我将导出设置为0减去横幅高度,以将iAdBannerView放在底部屏幕边距之外。@IBOutletvaradBannerView:ADBannerView!@IBOutletvaradBannerBottomConstraints:NSLayoutConstraint!overridefuncviewDidLoad(){super.viewDidLoad()//Confi

ios - AdMob 刷新请求

我有几个问题让我感到困惑:谁最负责广告刷新?在我加载请求bannerView.load(GADRequest())后,让开发人员或Google监控它是最佳做法吗?刷新时间应该短至30秒还是至少60秒?他们推荐60秒,但让您可以选择30秒,这似乎很奇怪。我在不同的帖子中读到过,您可能会因各种事情受到处罚,而且您的AdMob帐户将被关闭,不会有任何问题。如果是这种情况,如果您在控制台内选择30秒,而他们推荐60秒,如果他们觉得有任何“有趣”,他们可以仅根据这一点终止您的帐户。这是一个非常曲折的过程。它说如果您的应用程序自动刷新广告,请确保在屏幕关闭时不会发出广告请求。如果我的第一个问题的答

swift - iAd (ADBannerView) 工作,但在 Swift 中有奇怪的系统输出

尝试在测试应用程序中包含广告。Banner正常显示,但是从controller过渡过来的,其中在另一个controller上有广告,在系统输出中显示奇怪的信息:[AppDeveloper]ADBannerView:Unhandlederror(nodelegateordelegatedoesnotimplementdidFailToReceiveAdWithError:):ErrorDomain=ADErrorDomainCode=7"Theoperationcouldn’tbecompleted.Adwasunloadedfromthisbanner"UserInfo=0x7cd27

在 SpriteKit 中使用 Swift 的 IOS admob

我遵循了我找到的文档(swift中的googleAd)。当我在我的SpriteKit场景中表演时。命令行“bannerView?.rootViewController=Self”出现错误。gamescene无法转换为UIViewControllerbannerView=GADBannerView(adSize:kGADAdSizeBanner)bannerView?.adUnitID="xxxxxxxxxxxxxxxxxxxxx"bannerView?.delegate=selfbannerView?.rootViewController=self//->Error"gamescene

ios - 当广告加载失败时在 Swift 中隐藏 iAd ADBannerView - 没有委托(delegate)或委托(delegate)没有实现 didFailToReceiveAdWithError

这是我使用的代码:varbannerView=ADBannerView()self.canDisplayBannerAds=true//showadbannerifanadloadsfuncbannerViewDidLoadAd(banner:ADBannerView!){bannerView.hidden=false}//hideadbanneriftheadfailstoloadfuncbannerViewFailsToLoadAd(banner:ADBannerView!,didFailToReceiveAdWithErrorerror:NSError!){bannerView.

ios - iAd 横幅不适用于 iOS 9

在模拟器和设备上运行时,我在控制台中收到didFailToReceiveAdWithError消息。iAdbanners在iOS8上运行时显示成功。在iOS9上运行时,iAdbanners接收不到广告。.h#import@interfaceViewController:UIViewController@property(retain,nonatomic)IBOutletADBannerView*adBanner;.m-(void)viewDidLoad{self.adBanner=[[ADBannerViewalloc]initWithFrame:CGRectMake(0,[UIScr

ios - iAd 横幅不适用于 iOS 9

在模拟器和设备上运行时,我在控制台中收到didFailToReceiveAdWithError消息。iAdbanners在iOS8上运行时显示成功。在iOS9上运行时,iAdbanners接收不到广告。.h#import@interfaceViewController:UIViewController@property(retain,nonatomic)IBOutletADBannerView*adBanner;.m-(void)viewDidLoad{self.adBanner=[[ADBannerViewalloc]initWithFrame:CGRectMake(0,[UIScr

xcode - 带有 Swift 的 xcode 6 中的 iAd

我正在努力在场景中实现一个横幅广告,但它总是报告“Thread1:EXC_BREAKPOINT(code=EXC_ARM_BREAKPOINT,subcode=Oxdefe)并且程序停止运行。我引用了Mr.T'sanswer在另一个关于iAd("Swift-ADBannerView")的问题中,但仍然无法成功。代码如下所示:importUIKitimportSpriteKitimportiAdclassGameViewController:UIViewController,ADBannerViewDelegate{@IBOutletvaradBannerView:ADBannerVie

xcode - 带有 Swift 的 xcode 6 中的 iAd

我正在努力在场景中实现一个横幅广告,但它总是报告“Thread1:EXC_BREAKPOINT(code=EXC_ARM_BREAKPOINT,subcode=Oxdefe)并且程序停止运行。我引用了Mr.T'sanswer在另一个关于iAd("Swift-ADBannerView")的问题中,但仍然无法成功。代码如下所示:importUIKitimportSpriteKitimportiAdclassGameViewController:UIViewController,ADBannerViewDelegate{@IBOutletvaradBannerView:ADBannerVie