English 中文(简体)
How to show AdMob ads in real iPhone device?
原标题:
  • 时间:2010-05-27 03:33:35
  •  标签:
  • iphone
  • admob

I want to integrate AdMob ads in my iPhone app. I m using IB way to add the view and follow AdMob s pdf guide:

1. Add AdMob group(AdMobView.h,AdMobDelegateProtocol.h,libAdMob.a)
2. Add required frameworks(AudioToolbox,MediaPlayer,MessageUI,QuartzCore)
3. Add TouchJSON group
4. Add IBSupport group(AdViewController.h,AdViewController.m)
5. Add a 320*48 UIView in IB, add NSObject and change its class to AdViewController,
link AdViewController s view to the 320*48 UIView and link AdViewController s viewController to current view controller.

Now the iPhone simulator can show ads from AdMob, but when I test it on real device, I get the error "AdMob: Did fail to receive ad".

I ve tried to add test device s UDID to testDevices array, but still get the same error.

- (NSArray *)testDevices {
    return [NSArray arrayWithObjects: ADMOB_SIMULATOR_ID, DEVICE_UDID, nil];
}

Is there any problem in the above steps? Does anybody know why can t I get the ads in real device? By the way, what should be changed to build for real for-sale app, not just for test?

最佳回答

Setting testDevices seems not working for my test device. I ve added a deprecated method -(BOOL)useTestAd according to AdMob wiki and it works now.

- (BOOL)useTestAd {
    return NO;
}
问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签