Search Unity

Prime31 Tapjoy, AdMob and AdWhirl Plugins now available!

Discussion in 'iOS and tvOS' started by prime31, Feb 3, 2011.

  1. ssmchan

    ssmchan

    Joined:
    Nov 6, 2010
    Posts:
    72
    Dear Prime31,

    I would like to ask more details and steps about using your AdWhirl plugin in XCode directly without using Unity3D. Thanks in advance.. :)

    Regards,
    Simon.
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Simon, without Unity would be pretty much the same as with it. There is a singleton object that all the calls go through (you can see the actual calls in the *Binding.m file).
     
  3. ssmchan

    ssmchan

    Joined:
    Nov 6, 2010
    Posts:
    72
    Dear Prime,

    Got it! So that you mean I can import the "Plugin Code" directly in XCODE and reference the "Binding.m" for how to call it?

    Thanks,

    Simon.
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Simon, you can import the plugin code but you cannot reference *Binding.m. You can look at the methods in there and use their contents but you cannot use them unless you make a *Binding.h file with the function definitions.
     
  5. ssmchan

    ssmchan

    Joined:
    Nov 6, 2010
    Posts:
    72
    Dear Prime,

    Got it! I will try and seeking your help when I got question, Thanks..

    Regards,
    Simon
     
  6. liberliber

    liberliber

    Joined:
    Jun 14, 2011
    Posts:
    7
    Dear Prime 31

    I am new user of unity. I have developed new app and tried to plug in Admob SDK but it does not show up on our ipods iphones.
    If I purchase your SDKs that are sold in Paypal, will we be able to use Admob even though we use unity?

    Thanks
    Ken
     
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Ken, that is pesicely what our plugins do: they give you access to all the features from within Unity.
     
  8. liberliber

    liberliber

    Joined:
    Jun 14, 2011
    Posts:
    7
    Dear Prime31
    Admob seems to update SDKs what happens to the SDK we bought from you. Do you update your SDK plugins also?
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @liberliber, you get free updates for life.
     
  10. liberliber

    liberliber

    Joined:
    Jun 14, 2011
    Posts:
    7
    Dear Prime

    Thank you, I purchased the admob plugins by paypal, does plugin get emailed to paypal email or do I have anything else to do other than wait?

    Thanks
    Kenta
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @liberliber, you will get an automated email sent to whatever email address you have setup with PayPal as soon as the payment clears. Be sure to check your SPAM box just in case.
     
  12. liberliber

    liberliber

    Joined:
    Jun 14, 2011
    Posts:
    7
    Dear Prime 31

    I have bought admob and iAd plugins. I really do not know how to use it.
    I tried to test plugin.
    In the Build Settings, I targeted "AdMobTestScene" which was already included in Test Support and tried to debug on my iphone.
    Error message of "Cannot find protocol declaration for 'ADInterstitialAdDelegate'" popped up.

    Can you tell me how to use the plugins?
    I am having trouble with both admob and iad plugins.

    Kenta
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Kenta, It sounds like you are building against an old version of iOS. Ensure you are building against iOS 4.3 or newer and the error will be cleared up.
     
  14. cledin

    cledin

    Joined:
    May 29, 2009
    Posts:
    13
    Hi,

    The Adwhirl plugin works great except for on the iPhone 4 the ads are not visible im guessing they are below the game they rotate etc just fine but cant be seen.

    All other ios devices work.

    thanks
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Cledin, what makes you think the ads are off the screen only on iPhone 4? Do you see any evidence of this in the Xcode console?
     
  16. cledin

    cledin

    Joined:
    May 29, 2009
    Posts:
    13
    nvm, screen.height seems to be off...
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Cledin, remember, you can't use Screen.height to position the banner. Unity will give you the height in pixels. iOS does not function in pixels, it uses points. The iPhone 3 and 4 both have a screen that is 320 x 480 points.
     
  18. cledin

    cledin

    Joined:
    May 29, 2009
    Posts:
    13
    good to know thanks!!
     
  19. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    (Using AdWhirl)

    Is there any way to hide the banner without destroying it? What I'd like to do is only show ads during the menus -- but when I destroy/create to do so, the ads are pretty slow and won't always show up before the player is passed the menu. I guess that'd potentially mess with how the ads perceive click rates though...

    Anything I can do?

    Oh, interesting. So if I want to put the ad on the bottom instead, how would I do that? Currently I have Screen.height - 48 and it works on 3GS, but I'd assume it wouldn't work with other resolutions. Are the ads the same point height regardless of device?

    edit: Got it :)
     
    Last edited: Jun 23, 2011
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Jtown, due to AdWhirl having so many providers you can only destroy. They don't have a way to pause an ad. Screen.height - 48 is identical on an iPhone 4 and iPhone 3GS. Ads (and all UIKit views) are always the same height in points.
     
  21. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    Thanks :)

    Any way to do full screen 'skip to continue' ads for adwhirl? (sorry, I really should have done more research -- had no idea there were so many intricacies)
     
    Last edited: Jun 23, 2011
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @JTown, AdWhirl does no expose interstitial ads.
     
  23. J_P_

    J_P_

    Joined:
    Jan 9, 2010
    Posts:
    1,027
    About to submit. I never called setTestMode but it seems to throw me test ads. Does that mean it's turned on? How do I make sure it's off?

    Thanks for all the help :)
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Check the web portals of each ad vendor that you are using.
     
  25. zzarate

    zzarate

    Joined:
    Jul 5, 2011
    Posts:
    1
    Hey Prime31. What's the normal route for making a sanctioned ad vendor plug-in? We monetize virtual currency by allowing the user to watch short video ads.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @zzarate, feel free to shoot over an email to questions (at) prime31.com and we can chat about it.
     
  27. benni05

    benni05

    Joined:
    Mar 17, 2011
    Posts:
    60
    I've tried to position the AdMob banner in landscape mode in bottom center position. My understanding was that the default code in AdMobAdapter.cs should do the work for me except that it will place the banner in top position.

    The code looks like this:

    Code (csharp):
    1. AdMobBinding.createBanner( AdMobBannerType.iPhone_320x50, ( Screen.width - 320 ) / 2, 0 );
    Unfortunately Screen.width returns the real screen resolution so that the result of this formula would be on an iPhone4 with retina display: (960-320)/2 = 320. Since you explained that internally your plugin uses the point format of iOS this leads to the position of a banner in the upper right corner instead of the center. Either you would have to make it like this:

    Code (csharp):
    1. AdMobBinding.createBanner( AdMobBannerType.iPhone_320x50, ( 480 - 320 ) / 2, 0 );
    or maybe better switch your internal handling to real screen resolutions in pixels like exlpained in the answer to this:

    http://stackoverflow.com/questions/...to-detect-the-screen-resolution-of-the-device

    In order to position my banner as I wanted I eventually did it like this (for iPhone):

    Code (csharp):
    1. AdMobBinding.createBanner( AdMobBannerType.iPhone_320x50, ( 480 - 320 ) / 2, 320 - 50 );
    One question remains: How should I deal with the iPad line of code?

    Code (csharp):
    1. AdMobBinding.createBanner( AdMobBannerType.iPad_728x90, ( Screen.width - 728 ) / 2, 0 );
    Here I can't switch to 480 points, what would be the correct value or can I leave it as it is (except for the y coord)?

    Thanks
    Ben
     
  28. JohnLeeroy

    JohnLeeroy

    Joined:
    Jun 8, 2011
    Posts:
    68
    Hello Prime31,

    I just released a game for the Ipad using Adwhirl. The iAds that are in the game are defaulted to be 480x32. Is there a way to increase the size to ADBannerContentSizeIdentifierLandscape or ADBannerContentSizeIdentifierPortrait. Here's a quick link to Apple for their IAd sizes.
    LINK
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @JohnLeeroy, AdWhirl doesn't yet support anything other than "standard" ad sizes (320x50). They claim iPad and other ad sizes will be available at some point in the future.
     
  30. JakeT

    JakeT

    Joined:
    Nov 14, 2010
    Posts:
    34
    @Prime31 - you're about to make a customer out of me but I had a couple questions. First, can you recommend the best ad serving network / plugin between iAd, Admob and Mobclix? I have zero experience yet with the ad networks so I really just want to keep it simple while generating revenue.

    I have 3 paid apps (PlazaLingua Learn Spanish on the iPad, iPhone and Mac) and I want to get them all setup with ad supported / freemium versions. Do these plugins work on the Mac as well?

    Also, does your Etcetera plugin work on the Mac? I'm trying to setup a "Rate this" popup like iRate.

    Thanks in advance!
    Jake
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Jake, there is no real best ad network and lots of opinions which is why we have so many. The most popular seems to be Mobclix these days.

    All plugins are platform specific so you cannot use them on other platforms. It would be like trying to run a Mac app on an iPhone.
     
  32. lion123

    lion123

    Joined:
    Aug 23, 2011
    Posts:
    24
    when i load admob i get this :


    Assets/Plugins/AdMob/AdMobAdapter.cs(19,133): error CS0117: `UnityEngine.iPhoneGeneration' does not contain a definition for `iPad2Gen'

    and i just bought this plugin 10min ago
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lion, sounds to me like you are using an old version of Unity. Be sure to update to the latest version, 3.4.
     
  34. lion123

    lion123

    Joined:
    Aug 23, 2011
    Posts:
    24
    i have 3.3 is it possible to use it on 3.3 since i have a feeling that if i update all my files are going to be miss placed
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lion, I highly recommend always using the latest version of Unity. They work hard to make sure new versions perform better and have less bugs. That being said you can use the plugin on older versions but you will need to manually remove the references to classes/fields that were not introduced until Unity 3.4.
     
  36. lion123

    lion123

    Joined:
    Aug 23, 2011
    Posts:
    24
    Last edited: Sep 14, 2011
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lion, it looks like you need to clean up some of your JS. All of the errors seem to point to duck typing your variables.
     
  38. lion123

    lion123

    Joined:
    Aug 23, 2011
    Posts:
    24
    @Prime31 Yes i guess.I fixed most of them, it's just alot of BCE0005 and im stuck on the following, if you can give me a hand ? By the way is this bcause of unity3.4 or the Admob Plugin ?



    BCE0005: Unknown identifier: 'aPlat'.
    Code (csharp):
    1. aPlat = Instantiate(platformPrefab,platPos,Quaternion.identity) as GameObject;
    BCE0005: Unknown identifier: 'aPlat'.
    Code (csharp):
    1. aPlat.name="Platform"+i;
    BCE0005: Unknown identifier: 'gameOver'.
    Code (csharp):
    1. gameOver=true;
    BCE0005: Unknown identifier: 'hs_get'.
    Code (csharp):
    1. hs_get = WWW(getScoreUrl);
    BCE0005: Unknown identifier: 'hs_get'.
    Code (csharp):
    1. yield hs_get;
    BCE0005: Unknown identifier: 'hs_get'.
    Code (csharp):
    1. print ("Error getting scores:" + hs_get.error)

    BCE0005: Unknown identifier: 'theY'
    Code (csharp):
    1. theY=playerGO.transform.position.y
    BCE0005: Unknown identifier: 'platPos'.
    Code (csharp):
    1. platPos=new Vector3(Random.Range(-2.9,2.9),Random.Range(theY+12,theY+12.5),0);
    BCE0005: Unknown identifier: 'platPos'.
    Code (csharp):
    1. transform.position=platPos;
    BCE0005: Unknown identifier: 'hs_post'.
    Code (csharp):
    1. print ("Error posting score : " + hs_post.error);
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lion, I would suggest reading through the Unity release notes for 3.4 and posting your question in the Scripting Forum. I personally do not use JS at all and you will find plenty of JS users in the Scripting Forum that can assist you.
     
  40. slowdev1

    slowdev1

    Joined:
    Sep 12, 2011
    Posts:
    35
    Hi Prime31,

    I'm using your Tapjoy plugin for Android. I have it working for the most part, but how can I get a list of the user's bought virtual goods in my game?

    Thanks!
     
  41. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    hi, we bought admob plugin to use it in our app. but i am bit confused by the procedure. in the admob site they ask us for url of the app in the google market. what is the point when i need to compile it first with your plugin? do i need to have app in the market to work with admob plugin, can i get publisher ID from admob without my game in the google market? thank you!
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @killer, there is no method exposed by Tapjoy (that I am aware of) to retrieve all downloaded VGs. If you listen to the virtualGoodsDownloadedEvent you can store a local list in PlayerPrefs or on disk.
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pretender, There is no need to put the URL to your app while you are testing.
     
  44. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    ok we bought the admob plugin for android, i hope somebody will help us to make it work.

    here is what i did, some things remain unclear since i am new at this.

    1.) admob publisher ID, i registered on the site, but it is not clear what id to use. you can get publisher ID only if you add site/app url first.
    so i added fake one for testing and got publisher ID, i hope i did this right.it's the 15 alphanumeric string, in my case starting with "a"
    2.) i imported the admob package
    3.) generated manifest file (checked in the "Staging area" folder that manifest contains all that it needs about AdActivity)
    4.) dragged the AdMobAndroidBanner prefab into scene
    5.) used my publisher ID in the inspector

    built and tried it on android, but ads does not show.
    i later added one line in the script's start to test devices:

    Code (csharp):
    1. AdMobAndroid.setTestDevices(testDevices);
    just after:

    Code (csharp):
    1. AdMobAndroid.init( adMobPubliserId );
    ofcourse i put my device id in the string array which i acquired by adb devices.

    i am using, samsung gallaxy tablet 10.1

    did i do something wrong, can i somehow test the ad, just to see the banner or somehow to diagnose what the problem is? thank you very much!
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pretender, it looks like you have everything setup. You can get the publisher Id here: http://cl.ly/AUlq To get the proper device ID be sure to watch the logcat logs. They will also let you know if there are any issues with your publisher Id or if there is just no fill available at the moment. It does take 1 - 2 minutes for a fresh install to have an ad show up most of the time.
     
  46. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    865
    great, i managed to do it! thank you very much!
     
  47. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    111
    Hey Prime,

    Today I need your help again. I found following issue with the Adwhirl or standalone iAd plugin in combination with the Etcetera 1 plugin. Everytime when a Ad banner is created (works fine) and I call the function promptForPhoto from the Etcetera, the UI prompt appears as it should, BUT the buttons are not responding to my touch. Without the creating a banner with the Adwhirl or iAd plugin ,the promptForPhoto works without problems. I can take a photo or choose on from the library ore cancel the operation.
    I use the latest Plugin versions, the GM release from Xcode 4.2 + IOS5 device and Unity 3.4.1
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @maglat, are you destroying the banner before overlaying the picker?
     
  49. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    111
    EDIT: I'm sorry to say, destroing the banner didn't solved the issue :( I first call

    (the banner gets successful destroyed)

    and than

    (The promptForPhoto prompt appears but is still not responding to the touch.)

    EDIT_END

    EDIT2
    With the standalone iAD plugin the destroy method works. Now only the Adwhirl plugin makes me trouble. For your information, I use Admob + iAd with the Adwhirl plugin
    EDIT2_END

    :/ I never thought about that! Great hint! I'll try this!
    Thank you :)
     
    Last edited: Oct 6, 2011
  50. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    111
    What do you think about the issue above?