Reputation: 25
hi i have worked in simple app in which i implement iad feature but i don't know how to activate iad feature to iphone app plz out of snippet please give step to activate iad network and its functionality . thanks in advance
Upvotes: 1
Views: 1385
Reputation: 720
You must be enrolled in the iOS Developer Program to join the iAd Network. Members need to do the following:
* Agree to the Developer Advertising Services Agreement in iTunes Connect.
* Set up your banking and tax information if you don’t have a paid app on the App Store.
* Enable your app for iAd ads in the Manage Your Applications module within iTunes Connect.
* Set up your iAd preferences in the iAd Network module within iTunes Connect.
Upvotes: 1
Reputation: 11452
You need to import the iAD Framework and also enable it for your app on iTunes Connect.
Then try the following...
iAdBanner = [[ADBannerView alloc] initWithFrame:CGRectMake(0.0, 245.0, 768.0, 66.0)];
if(&ADBannerContentSizeIdentifierPortrait != nil)
portrait = ADBannerContentSizeIdentifierPortrait;
else
portrait = ADBannerContentSizeIdentifier320x50;
if(&ADBannerContentSizeIdentifierLandscape != nil)
landscape = ADBannerContentSizeIdentifierLandscape;
else
landscape = ADBannerContentSizeIdentifier480x32;
iAdBanner.requiredContentSizeIdentifiers = [NSSet setWithObjects:landscape, nil];
iAdBanner.autoresizesSubviews = YES;
iAdBanner.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
iAdBanner.delegate = self;
[self.view addSubview:iAdBanner];
iAdBanner.hidden = NO;
Upvotes: 0