iAd not give any ad [duplicate] - iphone

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

Related

Revmob Ads in IOS Application

I am trying to integrate Revmob Ads in my IPhone Application but after two or three time, i am getting time out message in my console and after it nothing is happening even if i place NSlog in delegate function.
Can any one help me to solve issue of time out?
And i am using Full screen Ads.
thanks
Usually you get no ads due to lack of ads for you device or due to time out on the connection with their server.
If you have no ads for you device you can force to show the ads with Testing mode:
[RevMobAds startSessionWithAppID:#"your AppID"];
[RevMobAds session].testingMode = RevMobAdsTestingModeWithAds;
If your problem is timeouts first you need to check if your internet connection is ok.
This kind of timeouts are a temporary issue and should be gone in minutes, if this problem
persists I recommend to contact revmob.
[RevMobAds startSessionWithAppID:#"Your Id"];
[RevMobAds session].testingMode = RevMobAdsTestingModeWithAds;

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

iAd error "Ad inventory unavailable" (Apple Sample code also not working)

I tried to include an ADBannerView into my application. But the ADBannerView always ends up in bannerView:didFailToReceiveAdWithError:. I'm not able to see any test ad.
I've also downloaded the iAd Sample Code from Apples DevCenter but I end up with the same error.
11/5/10 5:46:33 PM BasicAdBanner[12072] {
ADInternalErrorCode = 3;
NSLocalizedFailureReason = "Ad inventory unavailable";
}
Can someone please explain to me how I can get iAd to work in the Simulator and on my testing device?
No, I believe it was generated by Apple's server so that developers can make correction for the error.
Here is the reference from Apple.
Same here, using sdk 4.1 and unable to launch any iAd test app for the past couple of days.
I tried many things but nothing worked. Guess it's wrong on Apple side this time.
I had this problem too - an iPad would serve test iAds fine, but an iPhone would not. After a bit of investigation it seems to be related to the clock settings on the device, which sounds implausible I know! The automatic time on the iPhone was a few minutes slow, and the iPad a few minutes fast, as compared with the real time (as determined from the automatic time setting on the Mac).
Manually setting the time on the iPhone caused test iAds to start working - but only if the clock was correct to within a few seconds. So make sure to scroll the minutes wheel and exit the time picker just as the true time ticks over to the next minute. Actually it seems that it could be out by a few minutes as long as the seconds were about right, which is probably why the iPad worked ok despite being 5 minutes fast.
As to why the automatic time setting on the iPhone and iPad are so far out from the real time, that's another problem to solve. For now I'll leave my iPhone on manual time setting, at least while testing iAds.
This happened to me once - and then another time - it all worked properly. My app is released now, and works fine. So in short - maybe it a transient problem on Apple's side - or a local network problem on yours. Try again - see if it ever works. BTW - at one point I was able to get the sample iAd on my simulator but nothing on the iPhone - I released it anyway and never hand an issue.
I was testing out the iAdInterstialSuite sample project from Apple's developer site and I encountered this same error message on my iPhone 6 Plus.
I discovered how to fix it in this instance though. Apparently since that sample project hasn't been updated for the iPhone 6 / 6 Plus screen sizes, it fails because of the subsequent screen scaling the device is doing to the app. (I'm guessing the ad server knows the type of device is requesting the ad, and thus would expect the target view dimensions to be a very specific size.)
When I set a launch screen XIB for the project, so the app was then rendered at the proper scale on the screen, the test ads started working straight away. :)

iAd strange console "Unhandled error"

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

Apple Push Notifications - When Registering for Notifications no Callbacks are received at all

I've gone through all the steps as specified, am using a dev certificate with APN enabled and am calling registerForRemoteNotificationTypes: with the right flags in my app delegate.
Still, neither application:didRegisterForRemoteNotificationsWithDeviceToken: nor application:didFailToRegisterForRemoteNotificationsWithError: are being called. It looks like the registration request just gets stuck in transit.
What am I doing wrong?
This sounds silly, but it's bit me in the past: double-check your capitalization and parameter types. If a delegate method declaration isn't spot on your method won't get called, and you won't get any kind of warning.
Your best bet is to copy and paste the prototype from Apple's documentation.
Try your App on another device. If it works there...
I have the same Problem with one iPhone 3G (no jailbreak, no unlock). It somply dos not work with that phone. I tried updating to a newer iPhone OS. I tried a factory reset. It does show the confirmationscreen and it records the answer in the Settings. But neither application:didFailToRegisterForRemoteNotificationsWithError nor application:didRegisterForRemoteNotificationsWithDeviceToken are ever called.
The same App works on all other tested devices (ipods, iphones). This iPhone 3G does also not receive PNs for other apps.
PNs also did not work for one Jailbroken Classic iPhone.
It might be that your device is simply not behaving correctly. Try a different device.
I had this problem too and it was because of bad certificates, app id, provision profile...
Make sure that:
1, Correct certificates are installed on client AND server
2, Make sure that you have selected correct provision profile in your project settings. REMEMBER App ID in your provision profile has to be specific(not ending with *) and last part of this App ID has to match name of your application exactly and it is case sensitive. so iv your app is called myApp then your app id has to be SOMENUMBERScom.yourcompany.myApp
Just an idea...
I had the same problem and solved it by disconnecting from the cellular network. Seems to be some problem when both wireless and 3G are on concurrently.
I found out that PUSH notifications require port 5223 open in your network (if you are using WIFI), or otherwise, a cellular data connection.
I encountered the same problem in my home network, and had to open the port manually in the wireless router.