Tag: AdMob广告

AdMob GADBannerView在视图的可见区域之外加载广告

我正在尝试使用AdMob中介,并按照此处 AdMob的iOS快速入门文档中的说明进行操作。 它工作,我可以看到testing广告,但广告似乎加载在GADBannerView的可见区域之外。 我可以将广告拖到可见区域,但是当广告刷新时,横幅会再次加载到可视区域之外。 我无法弄清楚我做错了什么,也没有看到解决这个问题的方法,因为AdMob iOS SDK似乎在加载视图后处理所有事情。 任何帮助深表感谢。 我已经包含了一个animation来更好地说明我的问题。 (具有白色背景的视图以模式呈现,当工具栏button在蓝色背景的视图上触摸时,为方便起见GADBannerView最初以黑色背景加载。) 编辑:我发现这个问题似乎有一些与embedded视图控制器在导航控制器。 当导航控制器不存在时,不会发生这种情况,那么在添加导航控制器后,广告就会performance出这种行为。

iOS项目中无法更新Google AdMob

我已经使用Cocoapods将Google AdMob集成到我的iOS(Swift)项目中。 这工作正常。 当我第一次看到关于AdMod的更新的日志消息时,我运行了pod update但消息仍然logging在案,并告诉我更新AdMob。 从pod update的输出中,我看到AdMob是最新版本。 v 7.8.1,但不知何故Xcode不能识别这个变化。 有任何想法吗? 更新 我的Podfile: # Uncomment this line to define a global platform for your project # platform :ios, '9.0' target 'En Yakın' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for Ara Bul pod […]

如何将admob广告加载到Unity 5项目中?

基本上我试图加载一个横幅广告到我的Unity 5项目并导出到iOS。 这里是我打电话给内部的代码,这是连接到一个游戏对象: using UnityEngine; using System.Collections; using GoogleMobileAds.Api; using System; public class AdController : MonoBehaviour { InterstitialAd interstitial; BannerView bannerView; void Start () { //—— Banner Ad ——- // Create a 320×50 banner at the top of the screen. // Put your Admob banner ad id here bannerView = new BannerView( "ca-app-pub-xxxxxxxxxxxxxxxx", AdSize.SmartBanner, AdPosition.Top); […]

admob ios7错误audio框架

我在我的最后一个应用程序IOS7-Xcode5中集成admob SDK(当前),并且我有一个新的错误(在新项目上也一样),我想我错过了一些东西,但是我重新启动了这个过程很多次,错误仍然存​​在: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_AVAudioSession", referenced from: objc-class-ref in libGoogleAdMobAds.a(GADDevice.o) "_AVAudioSessionPortHeadphones", referenced from: -[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o) "_AVAudioSessionPortBuiltInSpeaker", referenced from: -[GADDevice audioRouteUsingAVAudioSession] in libGoogleAdMobAds.a(GADDevice.o) 我发现如何解决这些错误添加AudioUnit.framework但出现一个新的错误框架没有findAudioUnit …正如我最好的朋友谷歌告诉我,通过stackoverflow,“不要使用AudioUnit.framework,它是空的!现在使用CoreAudio。框架“。 但我的第一个错误回来了… 如果有人有同样的问题,主要是解决scheme,我将不胜感激:) PS:我试过-all_load和-ObjC,我连接AudioToolbox,我通常使用框架,但也粗心的错误;):/

GoogleMobileAds iOS 9链接错误

我遵循这个步骤,因为我安装cocoapods时遇到问题,我手动下载了SDK压缩文件,将它添加到项目中,编译得很好,但是我得到了很多链接错误,如下所示。 谢谢你的帮助。 Undefined symbols for architecture x86_64: "_CBCentralManagerOptionShowPowerAlertKey", referenced from: l942 in GoogleMobileAds(flat-x86_64) "_CVBufferGetAttachment", referenced from: l2397 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheCreate", referenced from: l2399 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from: l2400 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureCacheFlush", referenced from: l2398 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureGetName", referenced from: l2400 in GoogleMobileAds(flat-x86_64) "_CVOpenGLESTextureGetTarget", referenced from: l2400 in GoogleMobileAds(flat-x86_64) "_CVPixelBufferGetHeight", referenced from: l2397 in GoogleMobileAds(flat-x86_64) […]

尽pipe访问了正确的广告代码,但Google DFP广告素材会随机展示

我正在为Android和iPhone设备使用Google DFP广告pipe理系统(DFP广告pipe理系统)广告,我希望在横向模式中的iOS和Android应用的特定屏幕尺寸上显示广告。 我创build了一个订单,然后为该订单创build了一个订单项,在该订单项的内部,根据ios和android屏幕的物理尺寸创build了各种尺寸的“广告素材”。 然后我去了广告资源并为所有广告素材获取了广告代码,并将它们合并到我的应用程序中,并通过大小检查进行分隔 现在,我面临的问题是,在代码中,虽然访问了正确的广告代码,但是我为该代码指定的广告素材(图片)是随机选取的。 这个问题在Android和iPhone都存在。 我想知道为什么不只是指定大小的创意(图片)被挑选? 是否有必要分开iPhone和Android库存(广告素材)? 我也尝试了智能横幅广告尺寸和广告横幅尺寸,但指定的广告素材不显示。 ref智能横幅: https : //developers.google.com/mobile-ads-sdk/docs/dfp/Android/local#smart ref定制横幅: https : //developers.google.com/mobile-ads-sdk/docs/dfp/ android / banner#custom_size 另外,当我打开testing广告时,它们会显示在任何设备的整个宽度上,但我的广告不会显示在整个宽度上。 虽然如果testing广告的宽度小于设备宽度,则会自动在广告的两面添加一些背景以填充整个宽度。 但是在显示我的广告素材时不会发生这种情况。 Android和iPhone的代码:Android:select相应的屏幕尺寸广告 Fragment frag=new AdBannerFragment(); ArrayList<Integer> screenSize=Globals.getScreenSize (getActivity()); Integer width=screenSize.get(0); if (width==120) { frag = new AdBannerFragment ("/235389899/Clubfitting-Update-15_320x50-120dpi"); } else if (width==160) { frag = new AdBannerFragment ("/235389899/Clubfitting-Update-15_320x50-160dpi"); } else if (width==240) { […]

AdMob广告在iOS中不显示

AdMob广告在过去的几天内没有针对iOS版本展示。 它曾经工作,我没有改变任何东西。 iOS – 9.3.5 IDE – NetBeans 8.0.2 CodenameOne插件 – 3.5.2 操作系统 – Windows 7

iOS:Google Analytics和AdMob出现CocoaPods问题

假设: 我已经使用Google Analytics pod 'Google/Analytics Google Analytics(分析)为Google Analytics(分析)configuration了CocoaPods,请遵循官方安装指南: https : //developers.google.com/analytics/devguides/collection/ios/v3/? ver = swift 根据官方安装指南,我使用pod 'Google-Mobile-Ads-SDK', '~> 7.0'为AdMobconfiguration了CocoaPods: https : //developers.google.com/admob/ios/quick-start#streamlined_using_cocoapods 我使用此处报告的button生成了GoogleService-Info.plistconfiguration文件,并指定了Google Analytics和AdMob服务: https : //developers.google.com/analytics/devguides/collection/ios/v3/? GoogleService-Info.plist -config 当我启动应用程序时,我收到警告: 您已经在Developer Console中启用了AdMob服务,但似乎您的Podfile缺less该行:“pod”Google / AdMob“,或者您可能需要在项目目录中运行pod update 。 然后该应用程序崩溃的错误: 断言失败:错误configuration谷歌服务:可选(错误域= com.google.greenhouse代码= -106“缺less预期的子类。”UserInfo = {NSLocalizedFailureReason =有些subspecs不安装pod。详细信息请查看日志,NSLocalizedDescription =预期丢失subspecs。}):file /myapp/AppDelegate.swift Google Analytics(分析)文档在AppDelegate.swift文件中添加了此代码的断言行, // Configure tracker from GoogleService-Info.plist. var configureError:NSError? GGLContext.sharedInstance().configureWithError(&configureError) assert(configureError […]

iAd Admob与单身中介

我正在尝试使用iAd和Admob后备。 感谢这篇文章,我已经拿出下面的代码。 我有几个视图控制器,我打算显示一些补充。 代码目前的作品。 我看到debugging消息,如果iAd失败Admbod节目。 但是我不确定,如果是正确的做法。因为我不知道为什么原创作者重新初始化委托,appID和做另一个请求。 如果你能帮助我,我将不胜感激。 在AppDelegate.swift中 var iAdBanner = ADBannerView() var adMobBanner = GADBannerView(adSize: kGADAdSizeBanner) func bannerViewDidLoadAd(banner: ADBannerView!) { UIView.beginAnimations(nil, context: nil) iAdBanner.alpha = 1.0 adMobBanner.alpha = 0.0 UIView.commitAnimations() NSLog("iAd loaded ad") } func bannerView(banner: ADBannerView!, didFailToReceiveAdWithError error: NSError!) { UIView.beginAnimations(nil, context: nil) iAdBanner.alpha = 0.0 adMobBanner.alpha = 1.0 UIView.commitAnimations() NSLog("iAd failed to […]

Admob 6.8.0:手动删除,隐藏或禁用横幅

这里有很多类似的问题,但是没有一个解决scheme正在使用最新的AdMob SDK。 至less我不能让它工作。 加载: – (void)AdMob_Banner_On { bannerView_.adUnitID = kAdMobID; bannerView_.rootViewController = self; [bannerView_ loadRequest:[GADRequest request]]; (…) } 他们正在运行完美,现在删除…我发现的所有解决scheme都很简单,但他们不工作: – (void)AdMob_Banner_Off { NSLog(@"Admob: Turning Off"); bannerView_.hidden = YES; [bannerView_ removeFromSuperview]; [bannerView_ setDelegate:nil]; bannerView_ = nil; } 有时候我需要所有的屏幕,我不能一直显示广告。 有任何想法吗?