Skip to content

Latest commit

 

History

History
129 lines (79 loc) · 2.49 KB

File metadata and controls

129 lines (79 loc) · 2.49 KB

BidMachine iOS

BidMachine IOS Google Ad Manager

Getting Started

Add following lines into your project Podfile

NOTE: Spec contains a private pod for the BDM sdk. Add these lines to use the library

source 'https://github.com/appodeal/CocoaPods.git'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/appodeal/CocoaPods.git'
source 'https://github.com/CocoaPods/Specs.git'

target 'Target' do
   project 'Project.xcodeproj'
  pod 'BidMachineAdMobAdManager', '~> 0.1.0'
end

Initialize sdk

Use your seller id to initialize

    NSString *sellerId = @"127";
    [BMADMManager initialize:sellerId];

Banner implementation

NOTE: Banners are automatically updated every 15 seconds. Banner display is anchored to the bottom edge of the controller

Create banner with google unit id

    self.banner = [[BMADMBanner alloc] initWithUnitId:@"/91759738/spacetour_banner_1"];
    self.banner.delegate = self;

Start uploading your banner

    [self.banner loadAd];
    // Automatically show banner after loading
    [self.banner show:self];

You can manage the display through

    [self.banner show:self];
    // or hide
    [self.banner hide];

Interstitial implementation

Create interstitial with google unit id

    self.interstitial = [[BMADMInterstitial alloc] initWithUnitId:@"/91759738/spacetour_interstitial_1" rewarded:NO];
    self.interstitial.delegate = self;

Start uploading your interstitial

    [self.interstitial loadAd];

You can manage the display through

    if ([self.interstitial isLoaded]) {
        [self.interstitial show:self];
    }

Rewarded implementation

Create rewarded ad with google unit id

    self.rewarded = [[BMADMInterstitial alloc] initWithUnitId:@"/91759738/spacetour_rewarded_1" rewarded:YES];
    self.rewarded.delegate = self;

Start uploading your rewarded ad

    [self.rewarded loadAd];

You can manage the display through

    if ([self.rewarded isLoaded]) {
        [self.rewarded show:self];
    }