Search Unity

Prime31 Tapjoy, AdMob and AdWhirl Plugins now available!

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

  1. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Oh, I always called that "pixel". I have no idea why... o_O...

    Then why the screen.height = 640 on iphone 4GS and when setuping the position of a banner I need to write screen.height / 2 - 50?

    Just would like to understand why I need to devide by two....?
     
    Last edited: Jul 19, 2012
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sama, Screen.height is in pixels. Native iOS uses points. A retina screen has a scale of 2x doubling its pixel dimensions.
     
  3. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    I understand!
    I was years of light to know about it!

    One more time many thanks for the tips!
     
  4. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Hi Prime,

    Can I use Admob Mediation with the admob plugin?

    Roy
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tap, yes but you have to do the Xcode setup for each SDK you add manually according to it's documentation.
     
  6. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    @prime31 can do you a package for it? I just bought the adwhirl package and i also have the iad and admob for both android and ios from you but simplying all coding into one single admob package would be great since it's a pain full of "#if #else" right now.
     
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, we always recommend making a simple wrapper class to hide the #if statements.
     
  8. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    @prime31 i know about the #if #else... i think i explained myself badly. I meant to do a package for the admob mediation implementation, similar to what you've done with adwhirl. It would be helpful since it's a pain to manually handle each mediation network and the work you did with adwhirl should be easily translated to admod mediation
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, we will look into it for a future update. There are some problems that are most likely insurmountable though as some SDKs require additional adapter code that we cannot distribute so don't expect the change for certain.
     
  10. fernandes

    fernandes

    Joined:
    Aug 27, 2012
    Posts:
    1
    @prime31, my android plugin for admob stopped to show ads.
    the same build showing the advertisements in the morning, no longer shows any more during the afternoon.
    Can you help me?!?! It's very important
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @fernandes, unless we are magicians capable of changing the code on all of your customers devices you will want to contact AdMob to see what is happening with your fill rate.
     
  12. sisodiakaran

    sisodiakaran

    Joined:
    Jul 27, 2012
    Posts:
    1
    @prime31, I have purchased Adwhirl plugin. Now while using it for android
    I am following these steps
    1. Imported the plugin into my project
    2. Placed My prefab into my scene.
    3. From my adwhril Account inserted sdk keys into adwhirl adapter prefab Publisher Id . Enabled Banner On Top.

    Now When I am Playing The game I am not seeing any ads. My adwhirl account is configured with admob only.

    Please guide if i missed some steps
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sisodia, first off all this is an iOS forum. Secondly, you purchased an iOS plugin. It will do nothing on Android.
     
  14. cledin

    cledin

    Joined:
    May 29, 2009
    Posts:
    13
    what do I put in here. I am trying to use mediation with the interstitial. What is the UnitId? I already placed my publisher mediation id in the init
     
  15. cledin

    cledin

    Joined:
    May 29, 2009
    Posts:
    13

    To replay to myself I guess it is the publisher Id , and you don't use init for this. To anyone else who is wondering.
     
  16. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    @prime[31], does your plugin make it easy to know when tapjoy offerwall has been closed out of? I notice the recent patch notes for Tapjoy's iOS mention an event getting fired that indicate it : https://kc.tapjoy.com/en/integration/ios-change-log-release-notes. I assume you had some other way of getting around this before that feature was added or you have some other way of doing it?

    "- Whenever the app is suspended/exited, a close event will be sent. This happens automatically and does not require extra code (debug messages indicate the event has been sent)."

    The debug message I see in XCode when running my program mentions "TJCOffersView Dealloc", but that is deep within one of the provided plugin files.

    Would your plugin make this an easy to task to know when the offerwall closes, so I can immediately update the user's currency earned as soon as possible?
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @grehg, there is a viewClosedEvent that is fired whenever Tapjoy closes a view and posts the fact that they closed it.
     
  18. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    Thanks for the response, I didn't realize your plugin was so extensive, so I guess i preemptively asked a dumb question.

    When I used the Tapjoy Unity plugin SDK , and used the default appID/secret key given in one of their test scenes, I manually called InitVideoAd() + SetVideoCacheCount(5). I would then see 5 test videos in the offerwall.

    I notice the prime31 TapjoyBinding Init call uses a boolean for whether or not to InitVideoAd. Even when it is set to true, I don't see any videos in the offerwall. Do you know whats going on?
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @grehg, when calling init and passing true for the shouldInitVideo parameter it is directly equivalent to calling initVideoAd. You can then set the cache count with the setVideoCacheCount method. Tapjoy's SDK doesn't offer any callbacks that let you know if and when a video ad is loaded and ready to be displayed so it will depend on the current fill rate.
     
  20. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    All I'm doing is:

    TapjoyBinding.init( "93e78102-cbd7-4ebf-85cc-315ba83ef2d5", "JWxgS26URM0XotaghqGn", true ); // default appID/secret key from the SDK
    TapjoyBinding.setVideoCacheCount(5); // SDK says 5 is default

    TapjoyBinding.showOffers(); // Shows the offerwall like normal, but no videos
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gregh, that looks fine to me. Chances are you didnt give the video ads time to load or there is no fill for your app at the moment.
     
  22. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    I have two projects built onto a single phone. One is the Tapjoy SDK example project I had from earlier( before purchasing the unity plugin), the other is my current unity project with said plugin.
    If i run the Tapjoy SDK version and show the offerwall, videos show up in the list and play fine.
    If i use the prime31 plugin and show the offerwall, they don't show up at all.

    I double checked to see if I was using the exact same appID and secret key and they are identical. I don't know whats going on, but t can't be either of those two possibilities you first suspected.
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @grehg, if you send over your appId we can get it over to Tapjoy. There isn't anything else required besides initing with video support and the actual SDK example doesn't do anything more.
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @grehg, did you set the Deployment Target to 4.0 or higher? that is the only reason I can see that videos wouldn't show up. They seem to work fine for me with your info.
     
  25. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    @prime31, both programs were compiled in the same XCode version, but they may have had different build settings. Is that what you mean?
     
  26. Grehg

    Grehg

    Joined:
    Aug 29, 2012
    Posts:
    6
    @prime31, well that was it! I had to change the build settings in XCode from Deployment mode 3.0 to 4.0 and I can see the videos.
    Thanks a lot, you really saved my ass.
     
  27. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Hi Mike,

    I'm looking for the ads solution for my project. What i need is AdMob and iAd support. Your plugins give me at least 3 variants:
    1) Buy 2 plugins(iAd and AdMob), show iAd all the time, and show AdMob if iAd fails.
    2) Buy AdWhirl and use both vendors there. But does it still can't show iPad banners correctly? Or that's history already?
    3) Buy MobClix. Don't know anything about it yet, but people tell it's better than AdWhirl

    Please, give me an advice, what's the best solution for me? I'm making universal app for iPhone iPad

    Thanks!
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lisan, it is ultimately up to you to research the different ad vendors out there. AdWhirl never had proper support for iPad. We made some changes to get them working but AdWhirl themselves don't officially support the iPad. We always recommend setting up an account with each of them and seeing which web portal you like the best. That is where most of your time will be spent so it makes sense to find one that is easy for you to use.
     
  29. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Thanks, Mike
    I have no problems with choosing vendors, just with choosing your plugins, that's why i'm asking you. :)
    Can you give more details about what changes did you made in AdWhirl plugin according iPad support? Does it not crop banners anymore?
    I am mostly choosing between variant 1 and 2 now, variant 2 just gives more automated way to incorporate two vendors together.
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @lisan, the changes simply allow basic iPad iAd support. It isn't something we can go into detail about. AdWhirl is absolutely not automated. It is by far the most customizable solution but it is also the most work. Every ad vendor you want to add must be added manually along with all Xcode project changes required by the ad vendor.
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Important note: we will be off the grid with no cellular or internet access and unable to respond until September 27th. In the meantime read the documentation and check back through the forum posts to locate an answer to your question.
     
  32. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Posting here as well: I've updated my XCode and now I can't build ANY game that implements AdWhirl: HELP PLEASE!
     
  33. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    454
    Ok It's not a Prime31 problem, it's AdWhirl's. This is what I found useful to make it compile turning the errors into warnings:

    Open the AdWhirlAdapterIAd.h file and comment out the #import <iAd/ADBannerView.h>, then add this instead: #import <iAd/ADBannerView_Deprecated.h>

    /Pino
     
  34. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Hey Mike,

    We got the tapjoy plugin and have had some issues with it not using latest and greatest Tapjoy SDK and exposing these. Are you planning to update soon?

    Specifically:
    - latest TJ SDK offers placement support of ads with their "move to position X,Y" mthod instead of solely "upper left or lower left" boolean
    - sometimes when creating an ad with the auto sizing depending on platform, the first ad shown is small and the next one is then large (iPad 3)

    Contacting Tapjoy just gets you a shrug and them pointing to the Prime31 plugin.

    Thanks

    /T
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @thomas, the plugin uses the latest version of Tapjoys SDK already. We currently dont have plans to change the placements. The actual ad loaded has nothing to do with us. Tapjoy returns us an ad that we put in the view hierarchy. We have nothing at all to do with the creation of the view.
     
  36. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    Hi prime a quick question, is it enforced by the Tapjoy SDK that the featured app is always loaded upon init? Ideally I'd like to be able to not load the featured app if possible because we don't display it and prefer not to waste the bandwidth at startup so other replacement ads can load quicker. Maybe an additional boolean parameter in init? Thanks.
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, feel free to comment out the loading code.
     
  38. gregdevice

    gregdevice

    Joined:
    Feb 8, 2009
    Posts:
    11
    Hi Prime, I was able to get your AdWhirl plugin up and running and submitted to the AppStore without much headache. Since then, I've updated my Xcode to 4.5 and am now getting this error: Interface Builder could not open the document "AdWhirlWebBrowser.xib" because it does not exist. It's definitely in the project under AdWhirl.
    I've tried updating the AdWhirl SDK but still get the same error.

    edit: AdWhirl seems to work with only armv6/armv7 universal. My problem now is with the iOS social networking plug-in. It's giving me 351 duplicate symbols for architecture armv7. This is the newest social networking version. Can they both coexist peacefully..?

    edit #2: The 10-2-12 update seems to have resolved things for me. Thanks!
     
    Last edited: Oct 3, 2012
  39. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Hey Prime, Now that I've updated my xcode to the latest version and using Unity 4 Beta I get a crash when I show an AdMob ad. I'm also using the latest versions of your plugins.

    Here's the error:

    -[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xb772f40

    Here's the stack trace:

    libobjc.A.dylib`_cache_getImp:
    0x3485f560: lsr.w r9, r1, #2
    0x3485f564: ldr r3, [r0, #8] <---- EXC_BAD_ACCESS
    0x3485f566: add.w r3, r3, #8
    0x3485f56a: ldr r12, [r3, #-8]
    0x3485f56e: and.w r9, r9, r12
    0x3485f572: ldr.w r0, [r3, r9, lsl #2]
    0x3485f576: teq.w r0, #0
    0x3485f57a: add.w r9, r9, #1
    0x3485f57e: beq 0x3485f592 ; _cache_getImp + 50
    0x3485f580: ldr.w r12, [r0]
    0x3485f584: teq.w r1, r12
    0x3485f588: bne 0x3485f56a ; _cache_getImp + 10
    0x3485f58a: ldr.w r12, [r0, #8]
    0x3485f58e: mov r0, r12
    0x3485f590: bx lr
    0x3485f592: mov.w r0, #0
    0x3485f596: bx lr
    0x3485f598: nop
    0x3485f59a: nop
    0x3485f59c: nop
    0x3485f59e: nop
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dream, we currently do not support Unity 4. It is still under heavy development.
     
  41. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I fixed it:

    Under Other Linker Flags, add these two values to both Debug and Release:
    -ObjC
    -all_load
     
  42. gregdevice

    gregdevice

    Joined:
    Feb 8, 2009
    Posts:
    11
    Hi Prime, Any chance TapForTap could be easily integrated to work with the iOS AdWhirl plugin?
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @greg, as far as I know TapForTap is not supported by AdWhirl (http://cl.ly/JxXo)
     
  44. Gaspedal

    Gaspedal

    Joined:
    Mar 29, 2009
    Posts:
    376
    @Prime: I have added today your TapGage plugin to my app with your facebook plugin. But I got an XCode error:

    duplicate symbol _SBJSONErrorDomain in:
    /Users/admin/Library/Developer/Xcode/DerivedData/Unity-iPhone-clnxjaqcczpgjgehpcqzttvqoygq/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/SBJsonBase.o
    /Users/admin/Public/MyGame/MyGame/Assets/Editor/SocialNetworking/FacebookSDK/libfacebook_ios_sdk.a(FBSBJsonBase.o)
    ld: 1 duplicate symbol for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)



    It seems, that your TapGage (file SBJsonBase.o )and Facebook (file FBSBJsonBase.o) plugin causes a conflict.
    But I have solved it self. When I comment out the line:

    NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain";

    in TapGage SDK file "SBJsonBase.m", then it works fine and I can build my App without errors and can use TapGage. The static NSString SBJSONErrorDomain exists 2 times and that causes a conflict in XCode4.5.1. Is this a known problem between TapGage SDK and Facebook SDK?
     
    Last edited: Oct 7, 2012
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gas, many SDK vendors choose to use the same JSON library. When more than one uses the same lib without namespacing the symbols properly you get clashes. There is nothing that can be done but to modify the source on a case by case basis to remedy any duplicate symbols.
     
  46. Fai GM

    Fai GM

    Joined:
    Sep 13, 2012
    Posts:
    6
    Hi mike

    I bought admob plugin. Upgrade unity3.5.6 and xcode 4.5.1 and download admob newest version

    But i cant set adv position on left-bottom concer. (Lands.)

    Device : iphone4 ios 5, Ipad 2 ios 6
     
    Last edited: Oct 8, 2012
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @fai, due to AdMob returning ads of all different sizes even when requesting a specific size the plugin only allows bottom or top center positioning. You can certainly comment out the positioning code if you want to leave it on one place but you have to watch out for odd ad sizes.
     
  48. YourUncleBob

    YourUncleBob

    Joined:
    Jun 11, 2012
    Posts:
    55
    I've integrated the MoPub plugin into our game with no problems, but can't figure out what reportApplicationOpen() is for. I've dug through the MoPub api docs as well as the Prime31 plugin docs and don't understand when this is meant to be used.

    What does it do and when should it be called?
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @youruncle, it does pretty much exactly what the name implies: it reports an app open with MoPub mapping directly to their SDK's reportApplicationOpenForApplicationID method. If you arent an advertiser chances are you wont need it.
     
  50. YourUncleBob

    YourUncleBob

    Joined:
    Jun 11, 2012
    Posts:
    55