iAd strange console "Unhandled error" - iphone

I'm seeing in the console:
"Unhandled error (no delegate or
delegate does not implement
didFailToReceiveAdWithError:):"
Although didFailToReceiveAdWithError is being invoked (I can see that with check points and in the console log)
Does someone has any reasonable explanation? It's like it's working and not working all in the same time. I'm not using IB for the adview, and have added it programmatically and have set the adview.delegate = self. I'm also using three20 in this project if that changes anything.
It's like sometimes he knows who's his delegate and sometime not...

The Apple documentation says:
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.
In my app iAd also returns a mix of correct banners, error 3, error 5, ... and so on. Maybe this problem will disappear after the release of the app when iAd changes from
iAd Network serves test ads
to
iAd Network serves live ads if you signed the iAd Network Agreement and enabled advertising for your application

Related

While Integrating Apple iAd Framework getting Error this error?

I am integrated Apple iAd framework and I am getting this Error.Please Help me on this.
Error Domain=ADErrorDomain Code=2 "The operation couldn\u2019t be completed. Loading throttled" UserInfo=0x6b57cf0 {ADInternalErrorCode=2, NSLocalizedFailureReason=Loading throttled}
You've created too many banner ads simultaneously or have asked for a lot of ads in rapid succession. Reduce the number of ads you're trying to display and/or slow down your requests for new ones.
Is this the only error you get, or do you get other ones? Does it work sometime and not others?
The iAd test server tends to return a lot of errors, so that you can test your code for hiding and unhiding the banners and so on. If it works sometime and not others, then it should be fine - but like #myztikjenz says, you should check the rate/number that you are issuing requests and re-read the documentation to make sure you are issuing your requests correctly.

iAd not give any ad [duplicate]

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: 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.
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.
Yes, Removing app from device and rebuilding solved it in my case.
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.
After this did not work for me, deleting the app from the device and doing a clean build did.
Just an additional update, running ad testing on my IPAD I got this error suddently, after banging my head (as others have done) for a while I noticed the time on the IPAD was 8 mins out, both were set on auto but still 8 mins difference, set the IPAD clock manually and error went away!.
Hope this helps someone.
According to the ADBannerView class reference of Apple's documantation iOS Developer Library:
enum {
ADErrorUnknown = 0,
ADErrorServerFailure = 1,
ADErrorLoadingThrottled = 2,
ADErrorInventoryUnavailable = 3,
ADErrorConfigurationError = 4,
ADErrorBannerVisibleWithoutContent = 5,
ADErrorApplicationInactive = 6
};
typedef NSUInteger ADError;
//ADErrorInventoryUnavailable
//Indicates that no advertisements are currently available to download.
//Available in iOS 4.0 and later.
//Declared in ADBannerView.h.
Therefore it is an exception caused by the server side of the iAd; not the code itself.
For the last 5 days I've been having the same issue. I was getting a valid response before that and the bannerViewDidLoadAd delegate method was been called. Maybe there is something on apple's side? I didn't find anything that implies that, but it's my guess

iAd: How to simulate errors?

In my didFailToReceiveAdWithError I want to hide iAd banner and show banner from other ad provider.
How do I simulate error call?
Note: closing the internet connection is not an option since I still need it for the other ad provider.
Go into your settings -> Developer -> fill rate under iAd settings and select 0%.
You'll get errors regularly when running a test config. The service does this intentionally to help you test. You can also just call your didFailToRecieveAdWithError method from your didRecieveAd method.

iPhone iAds: Very inconsistent, sometimes bannerViewDidLoadAd does not get called

So I show my iAd banners when I get a callback to:
'bannerViewDidLoadAd'
But I've noticed that sometimes this doesn't get called. I have a constant high-speed
internet connection but if I run my app 10 times. 4 of out 10 times it won't show the iAds (i.e., bannerViewDidLoadAd does not get called).
Has anyone else experienced this (and what have you done about this)?
This is by design (I'm assuming you're still running in a dev environment) so that you can test your application when an iAd is available and when an iAd isn't available.
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.
per Apple's documentation

App Suddenly Closes

Fellow developers. My thanks to you all for your help and suggestions.
My app SafetyKnight has been approved for sale by Apple and I have submitted an inApp Purchase version for approval.
One last 'bug.' When first opening my app, it sometimes quits unexpectedly. Not often. But only rarely sometimes.
Does the MKMap or maybe not strong signal from communications provider cause an app to cut out at start-up?
Any thoughts or suggestions of code I might add to NOT have the app close/crash to enhance the user experience?
Check your app's memory usage during launch and initial view display. The app might be running out of memory if a lot of other Apple processes (or background apps) are running (Mail fetch, music player, etc.). Also make sure you are checking all your error and status return values from your networking code.
From the Organizer, you can access crash reports of any device connected to your computer. Make your application run in debug mode on the device until it crashes and check in debugger where it happens.
Did you handle the low memory notifications in the didReceiveMemoryWarning methods of the relevant UIViewControllers? What is the iOS you are building against?