Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iAd Plugin for Unity

Discussion in 'iOS and tvOS' started by jonaphin, Jul 8, 2010.

  1. esvaldo

    esvaldo

    Joined:
    Dec 11, 2009
    Posts:
    52
    My conclusions so far are:
    1) the iAd plugin is great
    2) the iAd network is miles away from its full potential. Besides the low fill rate it has an absurdly low CTR. Why? Because there are only two ads in the entire network and people rarely click (or touch) the same ad twice. We need to wait a bit more for the network to mature, for more companies to jump in, and more countries to get support
     
  2. lene3

    lene3

    Joined:
    Apr 7, 2010
    Posts:
    6
    Instruction said...
    - If all went well, you should now see “CoreGraphics.h”, “iAd.h” added to your Xcode project’s ‘Frameworks’ group.

    But I didn't find those files.
    what was wrong? ( I think patching was fail when I press Build in UNITY.)
     
  3. LeoNgai

    LeoNgai

    Joined:
    Jan 27, 2010
    Posts:
    26
    Hello jonaphin,

    Your plugin seems great and I just purchased and downloaded it. It works great! All these are done within 15 mins: From purchasing, installation, and running on my iPhone!!!!!

    Cheers,
    Leo
     
  4. LeoNgai

    LeoNgai

    Joined:
    Jan 27, 2010
    Posts:
    26
    Sorry, everything seems okay except for uploading binary. It says "The binary you uploaded was invalid. When supporting iPhone, the executable must include support for the armv6 architecture, unless the UIRequireDeviceCapabilities include the 'armv7' capability."

    Any hints? Thanks
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    project menu - active architecture - armv6

    if that does not show up there, check the project and active target settings if they are set to standard (armv6 armv7) and that you didn't enable the checkbox that tells it to only build the active architecture.
     
  6. LeoNgai

    LeoNgai

    Joined:
    Jan 27, 2010
    Posts:
    26
    Thanks a billion! It works! You are right!
     
  7. d.walker@trashgames.co.uk

    d.walker@trashgames.co.uk

    Joined:
    Dec 15, 2009
    Posts:
    9
    My app got accepted with your iAd plugin! Get it here!

    http://itunes.apple.com/gb/app/game-show-game-combustion/id382269122?mt=8

    It's been released for less than 24 hours and I got a fill rate of around 20% and a CTR of 9% when I checked this morning, of course iAds are only coming from the USA at the moment :(

    I am submitting the next in the series at some point today so hopefully if I get a few apps with iAds then the money will start to make sense!

    In the mean time check out the app and see if you can beat my highscore! And you Amercians out there make sure to click on the ads if you are so inclined ;)
     
  8. jackshiels

    jackshiels

    Joined:
    Feb 29, 2008
    Posts:
    357
    what sort of money have you made so far? I'm interested...
     
  9. d.walker@trashgames.co.uk

    d.walker@trashgames.co.uk

    Joined:
    Dec 15, 2009
    Posts:
    9
    Well I earned around $1 yesterday (not very much). But it hasn't even been live for a whole day yet and I guess most of America is asleep at the moment. But I'm going to give a it a few days and see what kind of average eCPM / impressions it gets.
     
  10. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    I created this thread http://forum.unity3d.com/viewtopic.php?p=360909 for people to post their iAd results and statistics as to not hijack this thread. If your using this plugin or have iAd integrated post your results on the above link.
     
  11. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    Mmmm? I must be doing something really stupid!

    I created a new project and scene in Unity iPhone 1.7 (Basic) and added a cube into the scene (no real reason for the cube).

    Imported the i3diad plugin 1.3.1 package
    Added iAd4Unity prefab to the scene
    Added the AdBannerBottom prefab to the scene

    When I press play in Unity I am expecting to see the test banner at the bottom but there is nothing other than the cube I created.

    Can someone point me in the right direction as I feel I have misunderstood something somewhere. Thanks.
     
  12. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    You must do a build and run - plugins will only run on the device

    Also make sure your target is iOS4 (you may be able to get away with a lower build target but for sure you would have to determine that you are running on iOS4 before calling any ads)
     
  13. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    Cheers iByte

    I thought this was maybe the case but I saw some screenshots earlier which looked like they were from within Unity.

    I'm just updating to SDK 4.0.1 tonight so I'll try this on the device tomorrow.

    Thanks
     
  14. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
  15. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    The screenshots I saw are on the first page from Jonaphin himself and Kenlem.
     
  16. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    I expect they were obtained using the screenshot capture feature of the XCODE Organizer application.

    iByte
     
  17. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    Ahhh.... I've learnt two things tonight.

    Cheers again iByte
     
  18. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Hi Jonaphin

    BTW Great work with the Plugin I've been so caught up in my other work(s) I've only just got to play with this last night! Can I double check a few things about the iAd plugin and best practices for using the iAd plugin with you?

    - You should only Instantiate the iAd Prefab once? [yes*/no] and then call ShowBanner() HideBanner() based on when you want ads to show in your game? [yes*/no] and you only ever do this for those users running on >= iOS4? [yes*/no], so obviously detecting their OS is a must (I.E. with iPhoneSettings.systemVersion) [yes*/no].

    - Do we need to detect the presence of a Network connection with iPhoneNetworkReachability before we instantiate the iAd prefab? [yes/no].

    - Once the iAd is instantiated and set to be displayed (I.E. iAd4Unity.ShowBannerWithPosition(iAd4Unity.BannerPosition.Top) will the gameobject be present in the game but invisible? [yes*/no] and will users only see the iAd gameobject once an ad has been served by apple? [yes*/no].

    * This denotes my initial assumption!

    Once more thing, ... if you have the room in your game UI is it best just to instantiate show it for the entire game? (I.E. main menu, the game levels etc) [Yes/No]. Does anyone do this? I guess you'd have to use the DontDestroyOnLoad call on it.



    Regarding other future plugin's --> A Facebook Connect plugin would be cool!

    Cheers,
    Dean
     
  19. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    Tried it this morning and working a treat. Thank you Jonaphin - I'm going to update my game with iAds tomorrow. I'll let you know how it goes.

    Thanks iByte for the guidance.

    Cheers.
     
  20. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    I originally was using this plugin its great.

    The problem is that 92+% of the people requesting an ad are from other countries and apple only has 2 ads for only us based requests.

    I recently put mobclix into my app to show a house ad of our other games if iAd doesn't serve an ad to other countries and ads from other networks. I hope this helps revenue.

    I have a good fillrate and click thru rate with the current version using this plugin but I am not seeing the requests Haggis is getting :p.

    Here is a screenshot of my app with iAds enabled.

    Its an interactive music toy. You play your music and watch and interact with the visuals. http://bit.ly/cDeitV



    Thanks again for the plugin. I have already recouped the cost ;)
     
  21. haggis

    haggis

    Joined:
    Mar 5, 2010
    Posts:
    91
    I haven't managed to do that update and I have had 1,100,000 downloads in 7 days - I feel like I have missed a trick! Hope I have not missed the boat entirely :oops:
     
  22. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Stop worrying about what might have been. Just dig in and do your update!
     
  23. minevr

    minevr

    Joined:
    Mar 4, 2008
    Posts:
    1,018
    Oh....I get it... :D
     
  24. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,571
    I'm considering an Ad supported version of my upcoming game. The iAd plugin sounds ideal, but I have 2 questions.

    1. How much of a hit is on frame rate?

    2. There was mention of adding additional ad-systems to combat the low iAd fill rates. Is this still likely? And relatively near in the future? I would like to get the high eCPM rates when available from iAd, but would love to also get high fill rates in all markets.
     
  25. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    http://mobclix.com/ is your answer.. I got it integrated with the latest Unity.
     
  26. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Is there a Unity asset for it?
     
  27. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Nope, I integrated it into xcode.
     
  28. esvaldo

    esvaldo

    Joined:
    Dec 11, 2009
    Posts:
    52
    Any news on this? :D
     
  29. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,571
    Mobclix integrated into the iAd plugin would be the ideal answer.
     
  30. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    wouldn't make much sense cause mobclix internally supports iAd and uses its own when iAd fails to offer an ad :)

    in addition mobclix is totally different in behavior and design than iAd

    -> vote for mobclix addon :)
     
  31. jackshiels

    jackshiels

    Joined:
    Feb 29, 2008
    Posts:
    357
    Bought! Looking forward to integrating this useful plugin. :D
     
  32. msureka

    msureka

    Joined:
    Jul 11, 2009
    Posts:
    15
    Hi,

    I am looking to buy this plugin, but there are a couple of doubts:

    1). Should I integrate iAd or admob or mobclix?
    2). I need it for iPad too. Since iPad is running on 3.2, iPad may not support iAd. So what are the options?
    3). For older devices running iOS 3.0, what should we use? Can it automatically detect the version / device and act accordingly?

    It would be great if anyone could suggest ideas..

    Thanks!
     
  33. nvarcha

    nvarcha

    Joined:
    Sep 27, 2008
    Posts:
    191
    Is there a way to detect if the user actually "clicked" an iAd?

    EDIT: I guess by using the bannerViewActionInProgress flag.
     
  34. XDumbnBassX

    XDumbnBassX

    Joined:
    Mar 14, 2009
    Posts:
    13
    Any chance you could email me about getting another copy of this plugin? I purchased a copy through paypal on your site, and didnt see the download link, then clicked "return to merchant site" thinking it would take me to some page on your site to download it and it just took me back to the main page.

    my email is danthestickman@yahoo.com, the paypal account i purchased it with is jeffnmisee@comcast.net (i can pay you a penny or something silly like that to confirm that its my account if you like)

    thanks,
    Jeff.
     
  35. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
    @XDumbnBassX: done :)

    @nvarcha: I could certainly look into implementing some sort of functionality for it. However, keep in mind that Unity is paused while the ad takeover is on, so there isn't much you would be able to do anyway while the ad is running.

    @msureka: I have looked at admob and mobclix. I would not integrate any of the two in the current plugin, as it would conflict with the "zero configuration required" goal that I set for this specific plugin.
    As for iPad support, well, that's not up to us. We are just going to have to be patient on this one, until we see what Apple is up to. Your options are iAd-free for the time being :)
    For older OSes, well, your game won't run at all, as you would have to require iOS 4.0+ in your iTunes Connect setup.

    @jackshiels: Thanks for your support

    @dreamora @esvaldo: As of today, it conflicts with the "zero-conf" goal of the plugin. I need time to think of a graceful, easy way to implement it, or make it a different plugin altogether.

    Regarding the update, I just got back home, I was out of the country. I'll do my best to get it done asap (see this week).
     
  36. corpselike

    corpselike

    Joined:
    Dec 8, 2009
    Posts:
    13
    Hi all,

    Has anyone managed to get the stinkbot's postprocessplayer looping script to run correctly with iAD and openFeint.... been trying but my dumbness is getting the better of me :(


    Regards,


    Corpse.
     
  37. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    I tried to use that method to merge the iAd and some of my own addtions but was not successfull. My primary reason for doing that @ the time was that append was broken in the U3 beta.

    Append seems to be working now but I would like to get PostProcessBuildPlayer working still using this method.
     
  38. jackshiels

    jackshiels

    Joined:
    Feb 29, 2008
    Posts:
    357
  39. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
    Congratulations, will download :)
     
  40. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Only a few months until it's in season again! ;-)
     
  41. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Apparently iAd does not work with OpenFeint as it overwrites the post process build script.

    I've integreated OF by removing iAd temporarily, but am having trouble integrating iAd manually. Can you list how I would go about doing this?

    Right now I'm getting a protocol error on NSXMLParserDelegate.
     
  42. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
    Could you please provide me with the openfeint postprocessbuildplayer script?

    I'll see if I can spare you guys the trouble.
     
  43. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Code (csharp):
    1. #!/usr/bin/perl
    2.  
    3. # PostprocessBuildPlayer #
    4. # Post-process build script for OpenFeint integration.
    5.  
    6. use File::Basename;
    7. use Foundation;
    8.  
    9. # Paths.
    10. $installPath = $ARGV[0];
    11. $currDir = `pwd`;
    12. chomp $currDir;
    13. $xcodeFiles = $currDir."/Assets/Editor/OpenFeint/";
    14.  
    15. # Error handling.
    16. sub handler
    17. {
    18.     my($msg) = @_;
    19.     `osascript -e \'tell application \"Finder\" to display dialog \"$msg\" buttons \"OK\"\'`;
    20.     die "$msg\n";
    21. }
    22. $SIG{'__DIE__'}  = \&handler;
    23.  
    24. # Make sure the OpenFeint directory exists.
    25. opendir(XCODEPROJECTDIR, $xcodeFiles) || die("Cannot find directory $xcodeFiles");
    26. closedir(XCODEPROJECTDIR);
    27.  
    28. # Add all necessary OpenFeint files.
    29. `osascript \'$currDir/Assets/Editor/OpenFeint/Xcode/UpdateXcodeWithOF.scpt\' \'$installPath\' \'$currDir\'`;
    30.  
     
  44. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
    Your lucky day... I hope

    1/ Rename the open feint postprocessbuildplayer to "postprocessbuildplayer_openfeint" and rename the iAd one "postprocessbuildplayer_iad4unity"
    2/ Create a new "postprocessbuildplayer file with the code quoted below (Thanks Rob!)

    The one point of conflict might be in how openfeint injects its code into the application's main. So if it doesn't work the first time, change the suffixes so that the iad postprocessbuildplayer file follows openfeint's.

    We'll take it from there if you have any issue.
     
  45. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    I still get that it cannot find the protocol for NSXMLParserDelegate. I have Foundation framework included but it does not like this. Any ideas?
     
  46. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Anyone? I can't get this to work so far no matter what order I run the scripts in. I do appreciate the script above btw, it just doens't help my compile issue. :)
     
  47. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    What part of the code is giving you that error? One of the plugins or some of your own code?

    Also if you do one but not the other does it compile okay?

    iByte
     
  48. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    1. Add OF to your project in Unity
    2. Rename the post process script like above
    3. Add iAd to your project in Unity
    4. Rename the post process script like above
    5. Add the script above
    6. Select Build
    7. Update project using steps from OF guide (adding frameworks, adding -ObjC, etc.)
    8. Switch to Arm6, SDK 4.0 and Build target 4.0
    9. Build
    10. You get the XML error

    If you remove iAd and the associated files, you compile just fine. If you remove OF and associated files you compile just fine. The two together = boom.
     
  49. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
    Can you please check that the iAd.framework and CoreGraphics.framework are added to the Frameworks group inside your final Xcode project?
    If that's the case, then it means the iAd script was run just fine.
    Also, as I mentioned, make sure to try renaming the postprocessbuildplayer files so that the openfeint one is called first. Who knows, maybe that will help.

    Good luck!
     
  50. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Yeah, it is being called. It's just not playing nice with OF. I tried re-ordering as well but no dice.