AdMob ad not working - iphone

I am trying to implement an AdMob ad in my app. I have done everything, but I just get a blank 48 x 320 view.
Here's what I'm doing:
1). Add all the frameworks and AdMob files
2). Open a view's .xib and add a view (320x48) and an NSObject there. Then put the NSObjects class to AdViewController. Then connect the two outlets (1 to the UIViewController class and another to the 320x48 view).
3). Build & run in Simulator.
My publisher ID is right. What am I doing wrong?
Thanks in advance!

I had same problem before... here is what I did.. not perfect.. kind of hack
I copied UIView from the ADMob sample code to use as AdView in my Project...
and it worked...

Sometimes AdMob could not deliver the ads to your app due to the lack of ads (maybe because of your current country location or because of their service errors). You should handle the failure of receiving ads to hide the banner from your app, otherwise, your app will look so ugly.
Try to re-run your app to see if AdMob does deliver some ads or not.

Related

Adwhirl for iPad

I'm trying to integrate adWhirl into my iPad app, but I it's doesn't seem to work.
It seems like lot's of people encountered the same issue, but I couldn't find a remedy.
I tried to stretch the adView to fit the iPad screen, but the ad remains iPhone sized.
Is there a known solution to this problem ?
This requires that you change each adapter that you would like to use.
I have written up a tutorial on how to do this with admob, iad, greystripe, and mdotm.
Take a look at it here: http://goosesoft.com/blog/universal-adwhirl-ads-in-cocos2d-2/
Edit: I have now also made a UIKit Universal Adwhirl tutorial found here: http://goosesoft.com/blog/universal-adwhirl-uikit/

How to add iAd to Ipad

I am working on an universal app and want to add an Ad Banner to it, the iAd is working fine in iPhone, But how to control that for iPad.
Because latest version of iPad supports iAd but in different size format and that gives error in my interface Builder when i targets for iPad 3.2.
Well, I haven't done that yet in my iPad apps, but here's how I would do it.
First of all, I would mark the iAd framework as a weak/optional link. This would be the first step for compatibility with pre-iOS4. If you don't do that, the app may not even startup
Secondly, I wouldn't add it in the nib file (if using one). I would rather add it programmatically to be ale to check if the iAd framework is available on device.
Finally check if iAd is present. If it is, setup the ad, but if it isn't, just continue, or setup admob instead or something.
How to check that iAd is present? One of the simple ways is doing something like this
if(NSClassFromString(#"ADBannerView") != nil) {
//iAd is present
}
Hope this helps

Bug Appears in Distribution (App Store) Version of iPhone App

I created an app that has a self-built photo tool. When I test (Debug & Ad Hoc), it works fine. It is built using a UIScrollView and adds each Photo to the UIScroll view as the photo's slot is scrolled onto the screen.
But now the app is in the App Store and the left-right swipe-to-load-photo feature is not loading the photos. This is the same situation on iPhone 3G and iPhone 4.
Any ideas why / how this could happen?
ADDITIONAL INFO
Upon further inspection and thinking about how I created this, here are some other notes.
If you swipe left/right after the first image appears, the app begins to 'lazy load' the next photo in sequence, depending on which way you are scrolling. If you get to the slot where an image is supposed to load and the image has not yet loaded, you see a UIActivityIndicator.
With the App Store version, I am usually just seeing blank screens. This makes me think it is lazy loading the images but not adding them to the subview, or not bringing them to the front of the view. If I scroll fast enough to outpace the lazy loading, I can get an image to eventually appear in one of the slots - so it is probably an issue with my lazy loading - but that doesn't answer "why does this work in ad hoc but fail in the app store version?"
Clean your build, then select Build and Analyze from the Build menu.
Maybe you get some helpful information there :)
try to test your app in device by building it in release mode than install in your device and test the app. You can also try in simulator in release mode.
Are the compiler optimization settings, preprocessor defines, SDK settings, etc., identical between your Ad Hoc builds and the final Distribution build? If not, that could cause a difference in behavior between the two versions on the same device.

iAds crash in AdWhirl

I'm implementing AdWhirl for the first time, and it is using iAds, AdMob, and MillennialMedia. AdMob and MillenialMedia seem to work perfectly fine.
iAds load, display, and refresh just fine in my PlayViewController, but when I click the back button to go out to the main menu, the simulator crashes, with no error printed to the Console and no "_kill" message sent to XCode when running the app with Breakpoints On in Build and Debug.
If it's an AdMob or MillenialMedia ad showing, I can click the back button and return to the main menu with no problem. And can go back in to the PlayViewController and load a new ad with no problem.
Any ideas how to prevent this issue that seems tied to the iAds?
Perhaps it is something to do with iAds having a built-in timer to refresh the ad?
Thanks in advance!
I moved it to the main ViewController and this issue is no longer happening.
However, since the ads are now started in the mainViewController but only displayed while in the PlayViewController, I am trying to find a way to tell AdWhirl to stop pulling ads when the player is on the main menu. It auto refreshes and keeps pulling ads even when I use self.adView = nil;
Did you checked the iAd Framework role ..if it's not weak make it weak that to make it not crash on the prior ios4

iPhone SDK: AdMob ads not appearing?

I am trying to display ads from AdMob.
I've tried to follow the standard instructions for implementation. However, I am receiving this error message and no ads display.
AdMob: Did fail to receive ad in AdViewController
Can anyone help?
That's not a mistake on your end. When you get that message it means that AdMob doesn't have an ad for you or that your device is offline. This is a common situation. This is not a bug.
For aesthetic purposes, you want to set a background image (or color) on the UIView that you set to be the view of your AdViewController.
Hope that helps.