Tag: AdMob广告

在iOS游戏应用程序和Swift中使用AdMob插页式广告

好的,我已经花了好几天的时间来做这件事了。 我已经通过admob的教程,YouTube,堆栈交换,一切,我无法find解决我的问题。 我正试图在我的iOS游戏应用程序中实施admob的插页式广告。 代码编译,构build,运行,游戏播放,但广告不会出现。 这是我的GameViewController.swift import UIKit import SpriteKit import GoogleMobileAds class GameViewController: UIViewController, GADInterstitialDelegate { //AD STUFF—————————–vBELOWv———————————————- //AD STUFF—————————–vBELOWv———————————————- var interstitialAd: GADInterstitial? func createInterstitialAd() -> GADInterstitial { let request = GADRequest() let interstitial = GADInterstitial(adUnitID: "ca-app-pub-******") request.testDevices = [kGADSimulatorID, "C966DEAC-A2FD-4FBA-80B5-802B7E394C6D", "F3E1897A-3556-4704-9C85-3D70B4672F44","090DCEE5-6B1C-4DFB-83CE-FE800A242008", "1B93E43B-E9B3-4482-8B11-4F3614A26EA2"] interstitial.delegate = self interstitial.loadRequest(request) return interstitial } //func to show the ad […]

真正的广告(admob)没有出现在现场应用程序

我有一个我的应用程序生活在苹果商店的精简版版本。 我已经整合了admob。 testing过程中,我成功地看到了广告,有时也会testing广告和实际的广告。 现在,当应用程序正在运行时,我可以注意到只有testing广告正在显示。 “这是一个testing广告” 链接到应用程序, 检查跟踪

Swift / XCode – 在dismissViewController期间AdMob插页式广告

我有一个简单的应用程序,需要一些帮助,让interstitials正确发射。 该应用程序只是两个意见。 MainVC和ModalVC。 在ModalVC上,有一个[CLOSE]button将用户返回到MainVC: @IBAction func closeButtonPressed(sender: UIButton) { self.dismissViewControllerAnimated(true, completion: nil). } 要从MainVC到ModalVC,我正在使用以下内容: self.performSegueWithIdentifier("mainSegue", sender: self) // Present Modally segue, default presentation, cross dissolve transition. 我遇到的主要问题是触发closeButtonPressed上的插页式广告。 我希望插页式广告在后台播放,而dismissViewController会执行。 这样,一旦用户完成了插页式广告,他们将返回到MainVC。 (插页式广告会每4次转换一次,只是一个参考,对于我的主要问题来说不是非常重要。)发生的是间隙性负载,然后立即closures。 见下面的代码: @IBAction func closeButtonPressed(sender: UIButton) { //INTERSTITIAL TRIGGER! if (self.interstitial.isReady) { self.interstitial.presentFromRootViewController(self) self.interstitial = self.createAd() dismissViewControllerAnimated(true, completion: nil) } else { dismissViewControllerAnimated(true, completion: nil) } […]

隐藏广告横幅不会导致请求/显示更多的广告

我有一个使用AdMob中介服务的testing应用程序设置,目前仅在testing设备上使用。 我已经为每个文档设置了所有必需的方法。 我有一个问题,当发生无法接收广告错误,没有更多的广告要求或显示? 标题: #import <UIKit/UIKit.h> #import "GADBannerViewDelegate.h" @class GADBannerView, GADRequest; @interface AdTestViewController : UIViewController <GADBannerViewDelegate> { GADBannerView *bannerView_; } @property (nonatomic, retain) GADBannerView *bannerView; – (GADRequest *)createRequest; @end Imp文件 #import "AdTestViewController.h" #import "Constants.h" #import "GADBannerView.h" #import "GADRequest.h" @implementation AdTestViewController @synthesize bannerView = bannerView_; – (void)viewDidLoad { [super viewDidLoad]; // Create a view of the […]

以编程方式closuresGoogle AdMob广告(iOS)

我正在使用适用于iOS的Google AdMob: Google AdMob 我想知道我是否能够以编程方式closures这些广告,所以他们停止显示。 阅读SDK后,我无法看到任何地方打开或closures广告。 编辑: 这就是我加载Google AdMob代码的方法: MainViewController.m – (void) viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. // Create a view of the standard size at the bottom of the screen. // Available AdSize constants are explained in GADAdSize.h. bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; […]

重复的符号架构arm64(Xcode错误)

我从我的项目中删除了所有对GoogleMobileAdsSDKiOS-7.1的引用,并添加了7.4.1。 当我在模拟器上运行应用程序一切正常,但在设备上运行时,我得到应用程序Mach-O链接器错误。 duplicate symbol l017 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS- 7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdNetworkJavaScriptAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l018 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMRAIDPicture.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADRewardBasedVideoAd+Mediation.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdAppViewController.o) duplicate symbol l021 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADLocation.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADNativeAdAttribution.o) duplicate symbol l016 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADBannerAdViewDelegate.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADNativeAdImage.o) duplicate symbol l005 in: /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADMWebViewRenderedChecker.o) /Users/ib/Desktop/Monster GoogleAds7.4.1/GoogleMobileAdsSdkiOS-7.4.1/GoogleMobileAds.framework/GoogleMobileAds(GADAdViewRenderedChecker.o) duplicate symbol l006 in: […]

Admob广告不显示iOS

我有横幅广告和插页式广告。 当我将adUnitID用于AdMob为您提供的testing目的时,它们就会出现,但是当我使用实时广告时,它们都不会显示。 横幅根本不出现。 当插页式广告出现时,它完全是黑色的。 adUnitID是正确的。 我的其他应用程序中的广告目前显示的很好。 当我使用iOS模拟器和我的设备时,都会出现这个问题。 有任何想法吗? var interstitial: GADInterstitial! func createAndLoadAd() -> GADInterstitial{ let ad = GADInterstitial(adUnitID: "ca-app-pub-7863284438864645/1835730011") let request = GADRequest() ad.loadRequest(request) return ad } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. authenticateLocalPlayer() self.bannerView.adUnitID = "ca-app-pub-7863284438864645/9358996816" self.bannerView.rootViewController = self let request: […]

在gameOverScene上与admob插播广告

我已经search了互联网的高和低的方向,关于在使用Swift时在SpriteKit场景中添加插页式广告。 谷歌文档仍然使用Obj-C。 到目前为止,我所收集到的是,我需要在viewController中初始化广告,然后从场景中的游戏中调用它。 任何build议将不胜感激。

将AdMob广告放置在tableview控制器的底部 – swift

我一直在试图在swift上实现Admob,一切都很好,但我用完了问题,因为我使用自定义表格视图单元格和“表视图控制器”作为主要的swift文件,所以当我拖动BannerView到作为桌面视图控制器的故事板,广告实际上出现在表视图的第一个单元格中! 相反,我需要加载它的button的tableview控制器不在单元格内? @IBOutlet weak var bannerView: GADBannerView! override func viewDidLoad() { super.viewDidLoad() self.bannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716" self.bannerView.rootViewController = self var request: GADRequest = GADRequest() request.testDevices = [GAD_SIMULATOR_ID] self.bannerView.loadRequest(request) // Uncomment the following line to preserve selection between presentations // self.clearsSelectionOnViewWillAppear = false // Uncomment the following line to display an Edit button in the navigation bar […]

在Xcode 9中未检测到GoogleMobileAds(Admob)框架 – 链接器错误

我得到了GADInterstitial引用的链接器错误。 未定义的符号为架构arm64 我使用了最新的admob框架GoogleMobileAdsSdkiOS-7.24.0 见附加图像。 如何解决它的iOS 11?