AdMob for iPhone/iPad
9th March, 2011
This tutorial will permit you to add adverts in your game with the famous mobile advertising : AdMob
Create an AdMob account
Go to http://www.admob.com/ and create your account
Create an app type
Go in the “Sites & Apps” tab, and click on the “+ Add Site/App” button.
Select your target (iPhone App, iPad App, etc.) and define an App name, choose a category and write a description. Then, edit the background color and click “Continue”.
You ad is created, note the PublisherID and open ShiVa to add it to your game.
Download the archive file Shiva3D_AdMob
Open ShiVa Editor. In the Data Explorer, click on Import>Archive:
Choose the previously downloaded .ste file and press “Import”.
The .ste file contains an AIModel. You now have to reference this AIModel in your game. Drag and drop it from the Data Explorer to the Game Editor>User Main AIs section.
Open the AIModel AdMob and inform your PublisherID in the sPublisherID global variable
Usage : Visible state
To make the banner visible:
user.sendEvent ( this.getUser ( ), "AdMob", "onPostSetVisible", 0, true )
To make the banner invisible:
user.sendEvent ( this.getUser ( ), "AdMob", "onPostSetVisible", 0, false )
Push the application on an iPhone or iPad, to see the ad at the bottom, front of your application.
Leave a Reply