tags:

views:

494

answers:

6

I'm adding iAd to my app. Now, in simulator, it works well but when I load it on a device (v4.1) the ADBannerViewDelegate calls bannerView:didFailToReceiveAdWithError: with this description on the error.userInfo

{
    ADInternalErrorCode = 3;
    NSLocalizedFailureReason = "Ad inventory unavailable";
}

I think my iAd Network setup is correct. Have I to add an ad by myself or iAd Network automatically sends test ads as in simulator?

EDIT: solution on comments

A: 

if you running with a development certificate you will only get test ads even when running on a device. From the iAd Programming Guide:

While you are developing your application, iAd Network sends test advertisements to your application. To assist you in validating your implementation, the iAd Network occasionally returns errors to test your error handling code. You can also test your error handling support by turning your device’s wireless capability off.

So you should see the test Ad on the device but you will never see a real live ad.

kharrison
Thanks, kharrison, I already read it. The problem is that I don't see nor real or test ads, nothing, it always returns that error :(
Espuz
did you enable your app for iAds with iTunes Connect? I assume you did if you are seeing tests ads in the simulator. Also does your device have network connectivity?
kharrison
It was all ok, kharrison. Maybe I missed something on ITC but know it works without aditional programming or configuration. I supose it was a "lag" issue. Thank you very much for your help.
Espuz
A: 

i am having the same problem Please Do let me know how to resolve this issue. Thanks in advance.

rabiea
As I comment below, I think it was a latency problem of the iAd Network server that dispatches the ads. I suppose that when the network had ads for my app it began to work fine.
Espuz
A: 

I am having the same problem. I never got the test ad to load on the device, however my code work fine on the simulator. ADInternalErrorCode=3 No inventory is what I always get on the device.

Any clues?

DiegoR
I commented below ;) "It was all ok, kharrison. Maybe I missed something on ITC but know it works without aditional programming or configuration. I supose it was a "lag" issue. Thank you very much for your help."
Espuz
I saw your comment. But you can have "lag" when you get real ads, how can you have lack of inventory if the only thing you want to display is the testing iAd banner?
DiegoR
I didn't expressed myself in good terms :P In that case when I said "lag" I was refering to the lag of setting up my app on the iAd Network, not a lag of receiving the ad on the device. Is the only explanation to this problem that I found. Maybe simply is that, in first sendings, iAd Network only send errors to manage them, I don't know.
Espuz
A: 

After this did not work for me, deleting the app from the device and doing a clean build did.

steve