xcode 更新到 iOS4.1 并且 iAd“测试广告”没有出现在模拟器上

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3841325/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:48:14  来源:igfitidea点击:

updated to iOS4.1 and iAd "test advertisment" not showing up on simulator

iphonexcodeiad

提问by Noam

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

我添加了教程中编写的 iAd,在我的应用程序中它总是调用didFailToReceiveAdWithError. bannerViewDidLoadAd永远不会被调用。我知道我应该看到“测试广告”广告,但没有显示任何内容,因为bannerViewDidLoadAd从未调用过该函数。

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}

未处理的错误(没有委托或委托未实现 didFailToReceiveAdWithError:):错误域=ADErrorDomain 代码=5“操作无法完成。横幅视图可见但没有内容” UserInfo=0xfdd4070 {ADInternalErrorCode=5, NSLocalizedFailureReason=横幅视图可见但没有内容}

回答by Wim Haanstra

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).

首先,在您的 iPhone 开发门户中检查您的应用程序的 iAd 状态。您必须在那里为您的应用程序启用 iAd 访问。这可能需要几个小时才能激活(根据我的经验)。

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.

此外,我认为用于应用程序的配置文件决定了应该显示哪些广告。它在文档中指出,开发和临时配置文件显示测试广告,而您的应用程序的分布式版本显示普通广告。

回答by AsadUllah

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.

似乎带有 iOS4.1 的 xcode 3.2.4 不支持 iAd。但是我正在用iOS4.0将xcode降级到3.2.3并且仍然面临iAds测试不显示的问题。

Any other reason.

任何其他原因。

回答by Mark Chackerian

I encountered the same problem. It turns out that my certificates / provisioning profiles were all out of date. Once I updated them, the problem went away without any further work.

我遇到了同样的问题。结果证明我的证书/配置文件都过时了。一旦我更新了它们,问题就消失了,无需任何进一步的工作。