user523841
user523841

Reputation: 25

how to activate Iad feature to iphone App

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

Answers (2)

Naina Soni
Naina Soni

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

Lee Armstrong
Lee Armstrong

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

Related Questions