iad

iAd in sprite kit game

耗尽温柔 提交于 2019-12-18 12:38:12
问题 I know there is at least one question asking how to integrate iAd into a sprite kit game, but that is not what I am looking for. I am looking for a portrait version of how to do it. There seem to be absolutely 0 tutorials online as to how to do this, so I came here. Can someone please tell me how to simply enable iAd in a Sprite Kit game? I have enabled canDisplayBannerAds and have used the originalContentView property for my UIView, but I keep getting a crash that says * Terminating app due

Autolayout and subviews

戏子无情 提交于 2019-12-18 10:41:07
问题 I am using the iAd suite with storyboards from Apple, as per this link... Apple iAd Storyboard documentation It all works fine until I turn autolayout on. It builds fine but crashes on running. The output I get is: 2013-08-24 12:06:36.138 TabbedBanner[7272:c07] * Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2380.17/UIView.m:5781 2013-08-24 12:06:36.139 TabbedBanner[7272:c07] * Terminating app due to uncaught exception 'NSInternalInconsistencyException',

Integrate iAd pre-roll video integration in my app?

痴心易碎 提交于 2019-12-18 09:39:20
问题 I want to integrate an iAd Pre-Roll video Ad to my application. When I run this application, it gives me this error: Domain=ADErrorDomain Code=0 "The operation couldn’t be completed. (ADErrorDomain error 0.) I want to know if this code is correct or incorrect. Thanks for your help. import UIKit import MediaPlayer import iAd class ViewController: UIViewController { var moviePlayer : MPMoviePlayerController! override func viewDidLoad() { super.viewDidLoad() let url = NSBundle.mainBundle()

iAds causes problems with auto layout?

帅比萌擦擦* 提交于 2019-12-18 09:16:44
问题 Whenever I set self.canDisplayBannerAds = true in my viewDidLoad method, my layouts all get shifted over and messed up for some reason. The webview has been zoomed in by a few pixels and the status bar is shifted down. but when I remove that line of code, my ad displays just fine and everything is perfect. 回答1: If you're implementing your own ADBannerView then you need to remove self.canDisplayBannerAds = true from your viewDidLoad . self.canDisplayBannerAds = true can be used for a no hassle

is it a good practice to delete the AdBannerView on viewWillDisappear and add it back on viewWillAppear?

家住魔仙堡 提交于 2019-12-18 05:22:08
问题 I am currently doing the following in my code avoid the issue of "obscured" ad. But is it a good practice? One potential problem is that - assume before the viewWillDisappear, there was an ad request send out, and then when the ad come back the adBannerView instance has gone. Would that be a big problem? Should I only do hideAdBanner instead? - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear: animated]; // create the ad banner view [self createAdBannerView]; if (adBannerView !=

is it a good practice to delete the AdBannerView on viewWillDisappear and add it back on viewWillAppear?

故事扮演 提交于 2019-12-18 05:22:06
问题 I am currently doing the following in my code avoid the issue of "obscured" ad. But is it a good practice? One potential problem is that - assume before the viewWillDisappear, there was an ad request send out, and then when the ad come back the adBannerView instance has gone. Would that be a big problem? Should I only do hideAdBanner instead? - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear: animated]; // create the ad banner view [self createAdBannerView]; if (adBannerView !=

How long do iAd apps take to start generating impressions?

时光怂恿深爱的人放手 提交于 2019-12-18 02:40:41
问题 I released an app with an iAd in it on Friday. So far it has generated zero impressions with many requests - a fill rate of zero. Most of my requests are in the USA (~90%) so the problem is not that the requests are from countries which iAd does not support). An older app of mine which is less popular is consistently generating a 98% fill rate despite a lower number of requests. I was just wondering if it's normal for iAd apps to not generate impressions right away. Should I expect to

Shared iAd banner bannerViewDidLoadAd not being called

我的未来我决定 提交于 2019-12-17 20:30:54
问题 I am using the following code to setup a shared iAd banner. AppDelegate.m - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { _adView = [[ADBannerView alloc]init]; } ViewController.m -(void) viewWillAppear:(BOOL)animated { AppDelegate *appdelegate = (AppDelegate *)[[UIApplication sharedApplication ]delegate]; _adView = [appdelegate adView]; _adView.delegate = self; self.canDisplayBannerAds = true; } - (void)bannerViewDidLoadAd:

iAd Banner is not working

不羁岁月 提交于 2019-12-17 16:57:07
问题 I'm trying to get a banner in my app, but since I added the banner, the app won't start. I get an error saying: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named ADBannerView' Code in .h file: #import <iAd/iAd.h> @interface FirstViewController : UIViewController <ADBannerViewDelegate> { ADBannerView *banner; } @property (nonatomic,assign) BOOL bannerIsVisible; @property (nonatomic,retain) IBOutlet ADBannerView *banner;

Using iAd as default ad network, and AdMob if iAd fails

帅比萌擦擦* 提交于 2019-12-17 15:45:36
问题 I've built my app this way and everything seems to be working more or less. After hearing about the notoriously low iAd fill rate I decided that this would be the best method, but I tried googling it and i couldnt find record of anyone else implementing ads in their app like this. Does this violate the TOS? 回答1: Why not use Adwhirl. Its great sdk that enables you to do exactly what you need. You can set priority settings for different ad networks which can be changed on the fly if you find