问题
I have made an app with iAd. It appeared both in simulator and my device when I deploy it. However, after the app is approved and up on store I downloaded it and cannot see the iAd. Anyone had this issue before?
Some of the iAd related code:
#pragma mark iAd delegate methods
-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[banner setAlpha:0.5];
[UIView commitAnimations];
}
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[banner setAlpha:0.0];
[UIView commitAnimations];
}
In viewDidLoad():
adView = [[[ADBannerView alloc] initWithFrame:CGRectMake(0, adY, 0, 0)] autorelease];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
adView.backgroundColor = [UIColor blackColor];
[self.view addSubview:adView];
adView.delegate=self;
adY is just a value based on the size of the screen.
回答1:
It takes four days after for release for Apple to start filling advertisements in iAd.
Also, iAd only works in certain countries. It doesn't work all around the world. The only countries that iAd will show advertisements in are:
Australia, Canada, France, Germany, Hong Kong, Ireland, Italy, Japan, Mexico, New Zealand, Spain, Taiwan, United Kingdom and United States.
Source: https://developer.apple.com/iad/resources/
Some very large markets are missing from this list. If you are not in one of these countries you will not see advertisements.
来源:https://stackoverflow.com/questions/23710487/iad-not-showing-in-downloaded-version-of-my-app