简体   繁体   中英

Admob interstitial house ads

I have implement admob trying to get interstitial house ads working.

interstitial_ = [[GADInterstitial alloc] init];
interstitial_.adUnitID = @"xxxMediationInterstitialID";
GADRequest *request = [GADRequest request];
request.testing = YES;    
[interstitial_ loadRequest:request];

When I set the testing flag to yes, things load fine. I know you need to be invited for paid ads, but I'd like to create a house ad for the in app purchase to remove the ads ideally.

I am confused on the create interstitial house ad section on the admob website. It seems like they allow you to upload a custom banner for the ad, but I don't see how to do it. Just “third party url”. Is there a way to get the house ads to show in my testing? Where do I upload a banner? I'm sure its something simple, I just couldn't find exactly where/how to do it. Has anyone done this? Should I set the test flag to NO? (it always says no content or something...)

You need to set request.testing = NO, the testing is only intended for debugging and making sure your implementation works - and to make sure you don't violate Google rule by showing and clicking your own ads while developing. Once you're ready to release you app, make sure to set testing to no!

If you implement the delegate function didFailToReceiveAdWithError you can do a NSLog of the error and see why you don't receive any ads - maybe there aren't any available in your region?

For house ads you'll have to upload it to the admob page, and they will make sure to serve it to your app when it requests ads. I don't have any hands on experience with this (yet) so I can't bring you any further.

But actually I'm trying to do the exact same thing in my app - offer in-app purchase in the case there is no interstitial ads to be served. I'm thinking (but not sure) that a house ad will not translate into an in-app function call that implement the in-app purchase. I'm thinking I'll attempt to display AdMobs interstitial and if that fails I'll slide my own view with my in-app purchase offer on it and a button on top of the current view. I have yet to implement the details ;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM