2

This has been driving me insane, so any help would be massively appreciated...

A client wants me to develop a prototype iAd-supported version of their existing iPhone app. They have done all the admin side of things to set up iAds. I have created a new target for the app with the iAd code added, but when I run it either in the simulator or on the device I just get bannerView:didFailToReceiveAdWithError: invoked with the message "The operation couldn’t be completed. Ad inventory unavailable".

Question 1: Should test ads appear in any old app, or do even test ads depend on the app being somehow registered for iAds?

Question 2: How can I enable the iAd Network in iTunes Connect for an app still in development? When I go to ITC and try to enable the iAd Network, it seems to expect me to do it on an existing (released) app, but it won't let me change the settings because the app is not in an "editable" state. And I don't want to edit the app anyway, since the iAds are intended for a new, as yet unreleased version. So what do I do for an unreleased app?

I'm amazed that I can't find an answer on these - they seem like fundamental questions...

Echelon
  • 7,306
  • 1
  • 36
  • 34

2 Answers2

2

Question 2: When you get the editable state error on itunesconnect, this is because it's trying to setup iAds on the current version (which if submitted will never had iAds as it has been submitted! - this is what it means by not an editible state).

You need to add a new version (which will be the next version you upload) and then click on the 'Set Up iAd Network' button. Then it will work!

ingh.am
  • 25,981
  • 43
  • 130
  • 177
1

There must be something wrong. I just create a test project, and added 3 lines of code. And I can see test ads.

And I can't remember that I configured anything for my app which is in the app store. Neither in itunes connect nor in the developer portal.
But I usually forget where I put my keys, so YMMV.


To confirm that this is a problem with your app and not your computer and/or internet connection I would create a new View based Project.

Add this to your viewDidLoad method

ADBannerView *adView = [[[ADBannerView alloc] initWithFrame:CGRectZero] autorelease];
adView.delegate = self;
[self.view addSubview:adView];

add the iAd framework and import the <iAd/iAd.h> header.

And see if this works. For me it does.

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
  • Thanks for clarifying that re. not having to do anything in ITC. And good advice to start with a clean slate, which I just did. However, I'm getting the same thing: it's trying to invoke the fail delegate. Server problem? – Echelon Jan 30 '11 at 23:20