appear admob to bottom in ios
Let's learn how to appear admob in ios.
install adbmob lib from cocoapods
We can download admob lib from cocoapods.
so down load from cocoapods.
admob link
CocoaPods link
First install cocoapods.
in the terminal.
pod install
In the project directory in terminal.
pod init
Open Podfile and insert.
pod 'Google-Mobile-Ads-SDK'
and in terminal.
pod install --repo-update
import library from xcode
We also need another library.
Check image and install libraries
Set admob in ceter
finally set admob in center.
in the appController.mm
// admob
self.adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
self.adView.adUnitID = @"admob id";
self.adView.rootViewController = _viewController;
self.adView.frame = CGRectMake(
_viewController.view.frame.size.width - self.adView.frame.size.width,
_viewController.view.frame.size.height - self.adView.frame.size.height,
self.adView.frame.size.width,
self.adView.frame.size.height );
// header file
extern "C"{
#import
};
I confirm version 3.15.1.