tags:

views:

405

answers:

4

Hello, I added the iAd as written in tutorials and in my app it always calls didFailToReceiveAdWithError. bannerViewDidLoadAd is never invoked. I know I'm supposed to see a "test advertisment" Ad, but nothing shows up, because the function bannerViewDidLoadAd is never being invoked.

I've looked into other questions, but didn't find an answer... I would have added code, but I suspect this is more of a misunderstanding between me and Steve.

Thanks.

UPDATE:

Can someone please let me know if this problem also shows him in the console: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0xfdd4070 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}

A: 

First of all, check your iAd status for your application in your iPhone Development Portal. You must enable iAd access for your application there. This might take a couple of hours to activate (in my experience).

Also, I think the provisioning profile used for the application determines which ads should be shown. It states in the documentation that development and ad-hoc profiles show test ads and that the distributed version of your app shows the normal ads.

Wim Haanstra
Even the "test advertisment" shouldn't show up without doing stuff at the iPhone Development Portal? I was under the impression this should be done only when I upload the app, and that it doesn't matter if I only test it on the simulator. Are you sure?
Noam
Yes, I think it only shows up when you register your application for iAd support. But it is easy to check out right? Just add your application for iAds in:iTunes Connect -> Manage your Apps -> Setup iAd NetworkIt's all really easy.
Wim Haanstra
I did as you said and created a new app (after creating a new bundle) in itunes connect and enabled its iAds. I also created a distribution provisioning profile and dragged it onto my xCode. Then I updated the info.plist to match the profile. But, that didn't help the iAd to appear with the "test advertisement". Any ideas?
Noam
Did you also set the profile correctly for the debug version you are running? Distribution certificates are normally not for deploying on your phone.Tried installing on your phone and the simulator? Any differences?What does the error tell you when the failed function is called?
Wim Haanstra
I'm getting "ADErrorDomain" as the error (not really sure what that means). I didn't try to install it on my phone, just on the simulator.
Noam
When I look under iAd Network I can see the new app id and "test ads enabled" for it. I think I've set the profile correctly for the debug version I'm running. I went to the info.plist file and updated the com.<company>.<appname> according to its profile. anything else I'm missing?
Noam
Another thing I think I should mention, is that this app wasn't built from scratch, I took a different project of mine, copied it, and than started changing.
Noam
and I don't have push notifications enabled.
Noam
A: 

Hello

The same problem i am also facing. When i tested the application on my xcode, it always calls the error function: didFailToReceiveAdWithError But when i tested the same code on other mac xcode it runs perfectly. just wondering why its happened with me.

i am thinking that there is a problem in New Xcode but i uninstalled the new xcode and then installed the xcode 3.2.3 but still the same problem on my mac system.

Thanks in advance

AsadUllah
A: 

it seems that xcode 3.2.4 with iOS4.1 does not support iAd. but i am downgrading the xcode to 3.2.3 with iOS4.0 and still facing the problem of iAds testing does not display.

Any other reason.

AsadUllah