Admob Titanium Module for iOS

Admob Titanium Module for iOS

Released 2 years ago , Last update 2 years ago

admob-module-ios is a Titanium module that helps to monetize your app by easily integrating banner and interstitial ads to your Appcelerator projects. Admob, iAd, inMobi, mDotM and Facebook mediations are supported so that you can use many ad platforms at the same time.


Demo

Description

Admob-module-ios is a Titanium module that helps to monetize your app by easily integrating banner and interstitial ads to your Appcelerator projects. Admob, iAd, inMobi, mDotM and Facebook mediations are supported so that you can use many ad platforms at the same time.

Features

  • Banner and interstitial ads are supported
  • Easy integration and usage with just a few lines of code
  • Google AdMob support
  • Mediation support with following platforms : Apple iAd, Facebook Audience Network, inMobi, MDotM
  • Free of charge usage, based on revenue sharing model 

Please note that,

  • This module will only work on **iOS devices** and does **not** support Android!
  • This module is created with Appcelerator mobile sdk version **5.1.1**.
  • iOS **8.0 SDK** or above is needed to use this module

 

Installation

admob-module-ios is already built and packaged as a module that you can install right away. Copy the ti.admobmoduleiosiphonex.zip (x is the current version) file to the Titanium directory by running the following line in the terminal:

$ cp ti.admobmoduleiosiphonex.zip ~/Library/Application\ Support/Titanium

The Titanium compiler will automatically expand the module into the correct directory when referenced in your application. The admobmoduleios module will be expanded into the following directory:

~/Library/Application Support/Titanium/modules/iphone/ti.admobmoduleios

Once the module is installed you can use it in your Titanium application project. Open your projects' **tiapp.xml** file and add the following lines at the end: (x in below shows the current version)

<modules>
<module version="x">ti.admobmoduleios</module>
</modules>

For more detailed instructions on how to use modules in Titanium apps you can read the [iOS Module Development Guide](https://wiki.appcelerator.org/display/guides2/iOS+Module+Development+Guide) section in the Appcelerator documentation.

Accessing the admobmoduleios Module To access this module from JavaScript, you would do the following:

 var admob_module_ios = require("ti.admobmoduleios");

The admob_module_ios variable is a reference to the Module object.

 

Usage

// Banner Ad Sample

// You can get your own at http: //www.admob.com/

var myBannerAdUnitId = '<YOUR_AD_UNIT_ID>'; 

//Create Admob banner

var adBanner;

adBanner = admob.createView({
	top : Titanium.Platform.displayCaps.platformHeight  (navbarHeight + bannerHeight + statusbarHeight),
	left : 0,
	width : Titanium.Platform.displayCaps.platformWidth,
	height : bannerHeight,
	adUnitId : myBannerAdUnitId, 
	adBackgroundColor : 'black',
	// You can get your device's id for testDevices by looking in the console log after the app launched
	testDevices: [admob.SIMULATOR_ID],
	dateOfBirth : new Date(1985, 10, 1, 12, 1, 1),
	gender : 'male',
	keywords : ''
});

win.add(adBanner);

// Interstitial Ad Sample

var myInterstitialAdUnitId = '<YOUR_AD_UNIT_ID>';

// Create and load the Admob Insterstitial

function createAd() {
	return admob.createInterstitial({
		adUnitId : myInterstitialAdUnitId,
		testDevices: [admob.SIMULATOR_ID],
	});
}

var fullScreenAd = createAd();

fullScreenAd.loadAd();

Pricing

FREE

Application License

  • Perpetual license

  • unlimited applications

  • Can distribute binary products only

  • Commercial use

License » Application License Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
No comments have been posted yet.