Home Tutorials Download Forum Documentation Wiki Blog

AdMob for iPhone/iPad
9th March, 2011

AdMob for iPhone/iPad

SDK, Scripting

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.38 out of 5)
Loading ... Loading ...

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.

Importation

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”.

Integration

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.

Setup information

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 )

Visualization

Push the application on an iPhone or iPad, to see the ad at the bottom, front of your application.

Leave a Reply

Leave a Reply

You must be logged in to post a comment.