问题
When I run app on simulator(4.0), iAd is appearing as Test advertisements. But when I deployed the app on ipod(4.0) , iAd is not appearing, even as Test advertisements.
Please help me out as early as possible... I m from India...
Regards...
回答1:
Where are you from? Maybe iAd is not available in your Country!.
Be sure your device is connected to Internet (WiFi or 3G).
To implement iAd in your application you need to import the iAd framework to your project and #include it to the ".h" of the ViewController where the Ad will be shown. For example:
YourViewController.h
#import <UIKit/UIKit.h>
#import <iAd/iAd.h>
回答2:
iAds aren't available in India at the moment.
iAd advertisements are currently being served to apps on the U.S., U.K., Germany, Italy, Spain, France, and Japan App Stores.
Src: https://developer.apple.com/iad/
回答3:
It's quite possible that there are no advertisements that are available to be shown, or perhaps the device does not have internet connection?
回答4:
In the simulator (and in development on device) iAds will randomly fail to load. They do this so that you can test out your handling of iAd errors. Implement the iAd delegate methods and see if that is what is happening.
I made a UIButton/iAd replacement class that will automatically fall back to a custom ad that you put in yourself. If you take a look at the code, you'll be able to see how to implement the delegates. https://github.com/blladnar/RBAdView
来源:https://stackoverflow.com/questions/4232580/iad-appears-on-simulator-but-not-on-device