AdWhirl and iAds – ShiVa Engine

AdWhirl and iAds

dave young and fzuleta: “This took several days to create, so feel free to give something back via paypal (). Instructions are inside the ZIP. It has taken a couple of users a total of 10-15 minutes each to get working. A sample Shiva game with ads in it is included. Enjoy!”

Resources

Download the dev pack from dave young’s server

ShiVa

– Import the STE into your project
– Add the AI AdWhirl to your User main AIs
– Open onFeli_says_StartAds() from the AdWhirl AI
– Set your AdWhirl Key
– Call from your Main AI when you want to start the Ads (usually onInit):

 user.sendEvent ( application.getCurrentUser(), "AdWhirl", "onFeli_says_StartAds" )

xCode

– Create your project
– Drag both AdWhirl and feli_AdWhirl folder into your classes.
– open S3DEngine_EAGLView.m, paste at the top of the file:

 #import "feli_Adwhirl.h"

and at the end of the function – (void)layoutSubviews

 feli_AdWhirlRegisterCallbacks();

– open S3DEngine_ViewController.h and add

 #import "Adwhirl_Helper.h"

and add the AdWhirlHelperDelegate, EXAMPLE:

 @interface S3DEngine_ViewController : UIViewController 

In the project view, open the Classes > AdWhirl > Adapters and remove references for the Ad systems you are not going to use, EXAMPLE for using iAds and AdMob
AdWhirl
– Add the system frameworks required by the supported ad networks:

 AddressBook
 AudioToolbox
 AVFoundation
 CoreLocation
 libsqlite3
 libz
 MapKit

The following additional frameworks are required by the iAd adapter:

 iAd
 QuartzCore
 SystemConfiguration

for other Ad companies, check out https://www.adwhirl.com/doc/ios/AdWhirliOSSDKSetup.html

Customizing Ads

If your game is landscape, you can open the AdWhirl AI, then open onFeli_says_StartAds, there is a comment on how to rotate the ads, and position it to the top.
Play around with the this.nAdFramePositionX, this.nAdFramePositionY values
Inside the comment there is a way to independently position the Ad for iPhone or iPad.




Need more answers?

  • slackBanner