1

I have setup a testing application with an Ad Banner. The ad banner is setup using AdWhirl where I use iAd and AdMob.

The application works fine and runs without errors. I am now looking to setup iAd only for the specific countries it is available within.

Within the iAd documentation it states

iAd Network recently launched in Canada. Ads are now available in apps in the U.S., Canada, U.K., Germany, Italy, Spain, France, and Japan App Stores. Be sure to configure your apps to serve ads in only these countries.

How can I configure the app to only show the iAds to users in these countries using adWhirl? I guess the first point would be to determine which ad network is serving the Ad at the time is this possible? Here is my view controller h and m if of any use, but it simply one banner at the moment for testing.

Also can this be tested that this actually works correctly? Can you change the phone simulator to act as if it where from another country?

#import <UIKit/UIKit.h>


@interface AdTestViewController : UIViewController <AdWhirlDelegate> {
    AdWhirlView *adView;
}

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic,retain) AdWhirlView *adView;

@end

imp file

#import "AdTestViewController.h"
#import "Constants.h"
#import "AdTestAppDelegate.h"
#import "AdWhirlView.h"

@interface AdTestViewController ()

@end

@implementation AdTestViewController

@synthesize adView;

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.adView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
    self.adView.autoresizingMask =
    UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin;
    [self.adView setDelegate:self];
    [self.view addSubview:self.adView];
    NSLog(@"Ad View Added");
}

#pragma mark - Delegate Methods
- (NSString *)adWhirlApplicationKey {
    NSLog(@"adWhrilApplicationKey");
    return kSampleAppKey;
}

- (UIViewController *)viewControllerForPresentingModalView {
    NSLog(@"viewControllerForPresentingModalView");
    return self;

}

- (void)adWhirlDidReceiveAd:(AdWhirlView *)adWhirlView {
    NSLog(@"adWhrilDidReceiveAd");
    // Used to animate the ad from the top to bottom 
    //[UIView beginAnimations:@"AdWhirlDelegate.adWhirlDidReceiveAd:" context:nil];
    //[UIView setAnimationDuration:0];

    CGSize adSize = [adWhirlView actualAdSize];
    CGRect newFrame = adWhirlView.frame;
    newFrame.size = adSize;
    newFrame.origin.x = (self.view.bounds.size.width - adSize.width)/ 2;
    newFrame.origin.y=  self.view.frame.size.height - adSize.height;
    adWhirlView.frame = newFrame;

    [UIView commitAnimations];
}

-(void)adWhirlDidFailToReceiveAd:(AdWhirlView *)adWhirlView usingBackup:(BOOL)yesOrNo {

}

@end

AdWhril Settings enter image description here

StuartM
  • 6,743
  • 18
  • 84
  • 160

1 Answers1

1

adWhirl is deprecated, and mediation feature is available in last adMob SDK now. Using it, you can switch percent of ads by ad providers to show in different countries. Check out documentation on adMob site.

Shmidt
  • 16,436
  • 18
  • 88
  • 136
  • I can see the option to change the percentage of the individual app networks in the Ap Settings in Adwhirl but not per country or by country? – StuartM Jan 07 '13 at 08:56
  • Sites and apps->Ad network mediation->(hover mouse over the app to see "manage settings" button, click it)->Turn switch "Allocate by" to %, and now you have the button "Add country level". Now quest is over :) – Shmidt Jan 07 '13 at 10:17
  • Forgive my stupidity, but I do not see these options. They are within AdWhirl correct? I have updated the question with an image of what I see... – StuartM Jan 08 '13 at 09:03
  • No, these options can be found in AdMob. Use last AdMob SDK, change code to use it instead of AdWhirl. Read here: http://support.google.com/admob/bin/answer.py?hl=en&answer=2576775 – Shmidt Jan 08 '13 at 10:02
  • 1
    Thanks, I caught up with what you were trying to get across. I completed a map to the new Admob mediation and am now able to setup the country specifics, appreciated! – StuartM Jan 09 '13 at 22:26