Skip to content

AdmobSDK is a Swift framework that supports the base display ad types from google making it convenient to configure

License

Notifications You must be signed in to change notification settings

mabeljarsdel/ADMobSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AdmobSDK

AdmobSDK is a Swift framework, a simple Ads engine that supports the google professional extension SDK

Requirements

  • iOS 12.0+
  • Xcode 12.0+
  • Swift 4.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

To integrate AdmobSDK into your Xcode project using CocoaPods, specify it in your Podfile:

Pod automatically updates latest version

pod 'AdmobSDK', :git => "https://github.com/Binary-Bridge-Labs/ADMobSDK"

Pod from special branch

pod 'AdmobSDK', :git => "https://github.com/Binary-Bridge-Labs/ADMobSDK", :branch => 'dev'

Pod from special tag

pod 'AdmobSDK', :git => "https://github.com/Binary-Bridge-Labs/ADMobSDK", :tag => 'x.y.z'

Pod from special commit

pod 'AdmobSDK', :git => "https://github.com/Binary-Bridge-Labs/ADMobSDK", :commit => 'xxx'

Then, run the following command:

$ pod install

Usage

Quick Start

Id ads Test: Refernce: https://developers.google.com/admob/ios/test-ads

public struct SampleAdUnitID {
    public static let adFormatAppOpen              = ""
    public static let adFormatBanner               = ""
    public static let adFormatInterstitial         = ""
    public static let adFormatInterstitialVideo    = ""
    public static let adFormatRewarded             = ""
    public static let adFormatRewardedInterstitial = ""
    public static let adFormatNativeAdvanced       = ""
    public static let adFormatNativeAdvancedVideo  = ""
}

Ads banner:

AdMobManager.shared.addAdBanner(unitId: SampleAdUnitID.adFormatBanner, rootVC: self, view: viewAdsBanner)

Ads NAtive:

// type: medium - small - unified
AdMobManager.shared.addAdNative(unitId: SampleAdUnitID.adFormatNativeAdvanced, rootVC: self, view: viewAdsNative, type: .small)

Ads Rewarded:

// Create id ads:
AdMobManager.shared.createAdRewardedIfNeed(unitId: SampleAdUnitID.adFormatRewarded)
// and
AdMobManager.shared.showRewarded(unitId: SampleAdUnitID.adFormatRewarded, completion: nil)

Ads Interstitial:

// Create id ads:
AdMobManager.shared.createAdInterstitialIfNeed(unitId: SampleAdUnitID.adFormatInterstitial)
// and
AdMobManager.shared.showIntertitial(unitId: SampleAdUnitID.adFormatInterstitial, isSplash: false)
import AdmobSDK

class MyViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
    }
}

License

AdmobSDK is released under the GNU GPLv2 license. See LICENSE for details.

About

AdmobSDK is a Swift framework that supports the base display ad types from google making it convenient to configure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published