Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to User contributions

Adwhirl iOS

Adwhirl iOS

Postby fzuleta » 12 Feb 2012, 08:52

Hi!
so I decided to make a new way "drag/drop" solution that I could share between my projects and that works with the projects made with the latest UATs, and I'd like to share it with you guys. Im not really sure its the best way, but its working for me, so let me know if it works for you, and if u have ideas on how to improve it: please post.
First,
:arrow: Special Thanks to pharaoh for his work on Adwhirl
:arrow: Special Thanks to Giggsy for his work on MASS and MAOF

Steps:
Download this:
f_Adwhirl.zip

in SHIVA:

    1. Import the STE into your project
    2. Add the AI [AdWhirl] to your User main AIs
    3. Open onFeli_says_StartAds() from the AdWhirl AI
    4. Set your AdWhirl Key
    5. Call from your Main AI when you want to start the Ads (usually onInit)
    Code: Select all
    user.sendEvent ( application.getCurrentUser(), "AdWhirl", "onFeli_says_StartAds" )


in XCode:

    1. Create your project
    2. Drag both AdWhirl and feli_AdWhirl folder into your classes.
    3. open S3DEngine_EAGLView.m, paste at the top of the file
    Code: Select all
    #import "feli_Adwhirl.h"

    and at the end of the function - (void)layoutSubviews
    Code: Select all
    feli_AdWhirlRegisterCallbacks();

    4. open S3DEngine_ViewController.h add
    Code: Select all
    #import "Adwhirl_Helper.h"


    and add the AdWhirlHelperDelegate EXAMPLE:
    Code: Select all
    @interface S3DEngine_ViewController : UIViewController <AdWhirlHelperDelegate>

    6. 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_0.jpg


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


That should be it!

----------------------------------------------------------------------------------------------------
Customizing Ad

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.

----------------------------------------------------------------------------------------------------
User avatar
fzuleta
Senior Boarder
Senior Boarder
 
Posts: 79

Re: Adwhirl iOS

Postby fzuleta » 29 Feb 2012, 15:44

hi everyone, with my two new games that came out, I realized that there is an issue with admob, its calling, but for some reason the ads are not being shown, I'll fix it asap, I'll let you guys know
User avatar
fzuleta
Senior Boarder
Senior Boarder
 
Posts: 79

Re: Adwhirl iOS

Postby ThunderZ » 29 Feb 2012, 18:50

Thx a lot for you're work :)
User avatar
ThunderZ
Platinum Boarder
Platinum Boarder
 
Posts: 429
Location: France - Loiret

Re: Adwhirl iOS

Postby boyk » 01 Mar 2012, 08:39

fzuleta wrote:hi everyone, with my two new games that came out, I realized that there is an issue with admob, its calling, but for some reason the ads are not being shown, I'll fix it asap, I'll let you guys know


Same, I think because this.

Warning: All new iPad and iPhone apps created after October 14, 2011 will require an AdMob SDK that was released on or after March 15, 2011. This corresponds to version 4.0.2+ for iOS. If you downloaded the library from our official download site, then you're already set. Otherwise you may have an old version of the AdMob SDK that was released prior to March 15, 2011, and your new app will not receive any ad impressions until you update your SDK.
boyk
Fresh Boarder
Fresh Boarder
 
Posts: 2

Re: Adwhirl iOS

Postby giggsy » 01 Mar 2012, 10:41

boyk wrote:Same, I think because this.

Warning: All new iPad and iPhone apps created after October 14, 2011 will require an AdMob SDK that was released on or after March 15, 2011. This corresponds to version 4.0.2+ for iOS. If you downloaded the library from our official download site, then you're already set. Otherwise you may have an old version of the AdMob SDK that was released prior to March 15, 2011, and your new app will not receive any ad impressions until you update your SDK.


I think so too!
We can use our old IDs without a problem, but new ones won't work.
User avatar
giggsy
Platinum Boarder
Platinum Boarder
 
Posts: 1103
Location: Austria

Re: Adwhirl iOS

Postby broozar » 08 Mar 2012, 14:17

User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3570
Location: Berlin - Germany

Re: Adwhirl iOS

Postby fzuleta » 12 Mar 2012, 20:24

Hello

Same, I think because this.

Warning: All new iPad and iPhone apps created after October 14, 2011 will require an AdMob SDK that was released on or after March 15, 2011. This corresponds to version 4.0.2+ for iOS. If you downloaded the library from our official download site, then you're already set. Otherwise you may have an old version of the AdMob SDK that was released prior to March 15, 2011, and your new app will not receive any ad impressions until you update your SDK.


thanks boyk, this is exactly the problem, so
Ive been playing around with it, and found a solution a "temp" solution for new Admob SDK:

which suggest using in terminal:

Code: Select all
        $ cd API_build
        $ mv libBumpAPI.a libBumpAPI.bak
        $ perl -n -p -e 's/MD5/MX5/g' < libBumpAPI.bak > libBumpAPI.a



When I apply this to the libGoogleAdMobAds.a, it seems to take away another function required based on the duplicate mx5, so doesn't compile, BUT! when I applied it to S3DClient_iPhone.a, the app builds no problem, displays ads and seems to work fine, however I'm not comfortable messing up this file,

NicoX if you read this could you please advice? could this work as a temp solution?

ah, one thing for it to compile, I did remove the Admod directory and commented all its calls in S3DEngine_EAGLView.h and .m
I also downloaded the new SDK from both Adwhirl and Admob and put them in without any modifications.
User avatar
fzuleta
Senior Boarder
Senior Boarder
 
Posts: 79

Re: Adwhirl iOS

Postby boyk » 13 Mar 2012, 16:58

Hello

It's work fine for me after upgrade to "GoogleAdMobAdsSDKiOS-5.0.5"

I just drag "GoogleAdMobAdsSDKiOS-5.0.5" to project, add "SystemConfiguration.Framework"
and I add simple Admob Banner with code from AdMob website

- Deleate "S3DEngine_ViewController" and add GADBannerView
- create AdMob banner in "viewDidLoad" function
- release AdMob banner in "dealloc" function
- Implement adViewDidRecieveAd

I can compile without any error :|
boyk
Fresh Boarder
Fresh Boarder
 
Posts: 2

Re: Adwhirl iOS

Postby makkar » 20 Apr 2012, 23:18

Hi,

Could someone please summarize the current situation with this Adwhirl implementation and latest Xcode/BetaUAT environments? Should the downloadable solution work now, is it updated, or should we try to follow each post in the thread like download latest sdk-s and comment out Admob, etc...?

Thanks,
Makkar
User avatar
makkar
Platinum Boarder
Platinum Boarder
 
Posts: 1521

Re: Adwhirl iOS

Postby makkar » 02 Oct 2012, 11:07

Coming back to this topic again.
Is this tutorial still working well for iAd?
User avatar
makkar
Platinum Boarder
Platinum Boarder
 
Posts: 1521


Return to User contributions