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

Prime31 Tapjoy, AdMob and AdWhirl Plugins now available!

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

  1. YourUncleBob

    YourUncleBob

    Joined:
    Jun 11, 2012
    Posts:
    55
    Occasionally (one time in 5 or so), when coming back from an interstitial ad using the mopub plugin, my game is locking up wuth this exception:

    'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <UnityViewController: 0x1ed5ff20>.'

    Any ideas?

    I haven't updated my build machine to iOS 6 yet. I notice the plugin is now using the AdSupport framework as an optional framework. Is building under iOS 5 a problem?
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @youruncle, building against iOS 6 is a requirement. You can still set your deployment target to whatever you want but you must link against iOS 6.
     
  3. YourUncleBob

    YourUncleBob

    Joined:
    Jun 11, 2012
    Posts:
    55
    Time to upgrade. Thanks.
     
  4. dream000

    dream000

    Joined:
    Oct 5, 2011
    Posts:
    26
    Hello Prime,
    We are thinking to purchase AdWhirl plugin. But before we do that we have a question: "If user clicks on an ad, will the game pause while ad is displayed?" I browsed the API docs but it does not mention anything about it and I do not see any events that can be utilized for this purpose.
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dream, whenever possible (during an interstitial for example) the entire Unity VM is paused.
     
  6. dream000

    dream000

    Joined:
    Oct 5, 2011
    Posts:
    26
    Thank you, Prime.
     
  7. Superflat

    Superflat

    Joined:
    Mar 19, 2009
    Posts:
    354
    Hello Prime,

    we've just bought the adwhirl plugin and we're have some questions:

    1. Are resolutions for Universals app detected?
    2. Are full screen adds possible? We have a few spaces where we would like these to show up instead of the smaller ones.
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @chald, 1. I don't think you understand the way iOS works. Retina resolutions don't need to be detected at all by the SDK. They will just work.
    1. Interstitial a are not supported.
     
  9. Luke_Remode

    Luke_Remode

    Joined:
    Dec 7, 2012
    Posts:
    2
    Hello Prime!

    I am currently in the process of implementing your TapJoy plugin and wondered if you could tell me when the tappointsEarnedEvent is fired?

    I am using some of the test ads that award me 100 of my virtual currency and i'm expecting the event to be fired after this has happened?

    will this only be fired if my currency is enabled by TapJoy (currently disabled and working with tester ads)?

    Cheers!
     
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @luke, the tappointsEarnedEvent is fired whenever Tapjoys SDK determines that the user earned some tappoints (the TJC_TAPPOINTS_EARNED_NOTIFICATION in their SDK). You will have to consult their docs for all the reasons it would fire.
     
  11. Luke_Remode

    Luke_Remode

    Joined:
    Dec 7, 2012
    Posts:
    2
    Ok, thanks i will take a look.

    The strange thing is, after a period of time (a few hours) i will relaunch my game and suddenly i have earned a ton of tap points (i'm guessing from previous testing) so it seems i'm not getting immediate feedback. Makes it a bit of pain when trying to give information to users whether they have been successful or not.

    I see there is a function that allows me to manually award them points, but there seems to be no way to retrieve information from the offer wall as to how many points they need to be given, unless i have missed something?
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @luke, awardTapPoints lets you award tappoints, getTapPoints lets you see how many tappoints the user has. The offer wall is 100% handled by Tapjoy and you cannot access any information about it or its rewards.
     
  13. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    Hello Prime31, once again I am here to test the mettle of your excellent customer service. I apologise in advance if the following problem turns out to be a TapJoy configuration issue on my end.

    I am using the 2012-11-05 Android Tapjoy plug-in (the latest). I'm running the included test scene. I am successfully connecting to the tapjoy servers but failing to load a full-screen ad.

    I have an active account for the game that is showing up as "integrated" on the TapJoy dashboard. My game does NOT use virtual currency. I have filled out the "Publish Non-Rewarded" section of the TapJoy dashboard and have received a non-rewarded currency ID (which your plug-in does not seem to use or require) I have added my phone's IMEI to the test devices section.

    I've attached my log (filtered with only TapJoy and Unity messages)
     

    Attached Files:

    • $log.txt
      File size:
      8.4 KB
      Views:
      1,388
    Last edited: Jan 22, 2013
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @starky, in the future post Android questions in the Android forum. The fullScreenAdDidLoadEvent is firing with false which indicates there is no ad fill.
     
  15. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    Gah! Yes indeed, sorry about the incorrect posting.

    I saw the fullScreenAdDidLoadEvent firing false. So my question becomes, why is there no ad fill? Am I missing some obvious step in my Tapjoy account configuration? Or should I thank you very much for your time and chase up Tapjoy support?
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @starky, all I can tell you is that there is no fill. Why there is no fill only Tapjoy can answer.
     
  17. actuallystarky

    actuallystarky

    Joined:
    Jul 12, 2010
    Posts:
    188
    Okay, I'll chase up Tapjoy. Thank you very much for your assistance.
     
  18. arslanmkhan

    arslanmkhan

    Joined:
    Feb 15, 2012
    Posts:
    5
    hi i have bought prime31 admob plugin but i am receiving this error

    UnityEngine.iPhoneGeneration' does not contain a definition for `iPad3Gen'

    here is my software details
    OSX 10.8.1
    Unity 3.5.0f

    any help would be appreciated
    regards
     
  19. arslanmkhan

    arslanmkhan

    Joined:
    Feb 15, 2012
    Posts:
    5
    when i tried to build admobtestscene it gives me following error in unity

    TypeLoadException: Could not load type 'UnityEditor.Callbacks.PostProcessBuildAttribute' from assembly 'Prime31MenuItem'.
    System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType)
    System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit)
    System.Reflection.MonoMethod.GetCustomAttributes (System.Type attributeType, Boolean inherit)
    UnityEditor.AttributeHelper.ExtractGizmos (System.Reflection.Assembly assembly)


    what could be the issue
     
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @arslan, our plugins support Unity 3.5.2+. You need to update to a more modern version of Unity.
     
  21. terencetan

    terencetan

    Joined:
    Oct 29, 2012
    Posts:
    4
    I recently integrated the latest version of the Admob plugin for iOS the ads are appearing but I am having a problem with Screen orientation. I suspect its something to do with the new way iOS 6 handles thing. Our application is locked in landscape, but when the user clicks on the ad and pops into the browser they are allowed to 'autorotate' to portrait. If they hit 'done' when in portrait, the unity screen is left rotated.

    So far I have tried the following without success
    1) Resetting Screen.orientation = Landscape in unity after adViewDidDismissScreen(I inserted a UnitySendMessage there)
    2) Tried resetting the view to landscape using UnitySetScreenOrientation which I assumed was Unity way of resetting the view in cocoa
    3) Tried resetting the view to landscape using [UIApplication sharedApplication] setStatusBarOrientation:UIDeviceOrientationLandscapeLeft animated:NO];

    http://developer.apple.com/library/...ges/RespondingtoDeviceOrientationChanges.html

    From what I can tell from stackoverflow and the apple documentation is that you have to force the new iOS6 prior view to return NO on auto-rotation using - (NSUInteger)supportedInterfaceOrientations,- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation in iOS6 and - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation in iOS5. Checking Unity does seem to this properly by locking down those choices

    I would like to be able to:
    1) Autorotate the view back to landscape
    2) Failing that lock the incoming view to only landscape
     
    Last edited: Feb 20, 2013
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tere, it is a requirement when dealing with any native views that you never call Screen.orientation to set the orientation. Doing that is a complete hack and will completely break native view functionality.
     
  23. terencetan

    terencetan

    Joined:
    Oct 29, 2012
    Posts:
    4
    If you look at my post, I only "tried" re-rotate the orientation back of the UNITY screen after the native view is dismissed. The native view is rotating the Unity Screen BTW. It doesn't work anyways.

    Any solution on rotating the Unity Screen back or locking rotating on the native view would be helpful.
     
  24. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    Hi prime31
    I'm having an issue with the adwhirl plugin in ios. As soon as I activate it, I get a crash on the device. I never had this problem before. I tried removing all editor folders and plugin folders for adwhirl, redownload latest version and build replace but it keeps crashing. This is the crash:

    2013-02-22 13:12:03.555 dogfight[12999:907] -[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xba99000
    2013-02-22 13:12:03.557 dogfight[12999:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xba99000'
    *** First throw call stack:
    (0x317442a3 0x3946197f 0x31747e07 0x31746531 0x3169df68 0xd16ab0 0xd18504 0xd15fe0 0x724488 0x6c0f50 0x6bfe7c 0x3205b0f5 0x31719683 0x31718ee9 0x31717cb7 0x3168aebd 0x3168ad49 0x352612eb 0x335a0301 0x5400 0x3698)
    libc++abi.dylib: terminate called throwing an exception

    and the debugger will just point to a general UIApplicationMain in the main method:

    int main(int argc, char *argv[])
    {
    UnityInitTrampoline();

    if(!UnityParseCommandLine(argc, argv))
    return -1;

    RegisterMonoModules();
    NSLog(@"-> registered mono modules %p\n", &constsection);

    NSAutoreleasePool* pool = [NSAutoreleasePool new];

    UIApplicationMain(argc, argv, nil, @"AppController");

    [pool release];

    return 0;
    }


    as long as i don't call the createBanner method, it works just fine. Btw only admod ads are activated.
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, per AdMobs documentation you must add the -ObjC and -all_load linker flags for their SDK to work
     
  26. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    actually I just check and they were already and it fails badly. I have them on other linked flags as -all_load,-ObjC
    any ideas?
     
  27. cms

    cms

    Joined:
    Sep 19, 2011
    Posts:
    43
    Hello prime[31],

    As indicated in your website, the Mopub plugin is available for free but you are still selling it. Is there any difference ? The one that you sell is up-to-date, has more maintenance ? Is it easier to install ?

    Thanks in advance.
     
  28. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    253
    Hello.

    I don't think I'm receiving test ads properly from AdMob, using my AdMob identifier (not AdMob Mediation). I seem to be getting things that look like regular ads (instead of what I see googling "AdMob test ads"), even though I call AdMobBinding.init( "[myid]", true);

    I read from the AdMob site that you have to give it your device IDs in order to receive test ads, but I couldn't find any code where you do so in your plugin. I also found that test ads aren't supposed to work on iOS 6, but my device is still running on iOS 4. I haven't tested yet on simulator, because I'm getting linker errors (on "_FMOD_OggVorbis_Calloc" in case this is related somehow).

    Thanks for any response in advance.
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cms, MoPub has asked is to keep our version up for a bit longer. The only major difference is that ours has our custom build system that fully sets up your Xcode project automatically each time you build.


    @tommi, you have to follow AdMobs documentation to learn how to enable test ads with AdMobs SDK. Unity doesn't support plugins in the simulator.
     
  30. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    253
    Thanks, Prime31.

    Though I thought one would never have to meddle with Xcode (or Eclipse) code when using your plugins (for their stated purposes). So could you clarify if I actually need to write code in Xcode to make test ads work? The AdMobs SDK docs here would suggest I do have to add my device ID in code: https://developers.google.com/mobile-ads-sdk/docs/admob/best-practices . Other than that, there's a setting ("Use test mode setting set in client code") on the AdMob site (which as you can see I've also set).
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tommi, to enable test mode you have to manually enter your device ID's in the Obj-C file just like the AdMob docs state if you want to do it per device. The init method takes in a bool that lets you set test mode as well.
     
    Last edited: Feb 24, 2013
  32. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    253
    Yes, as I said in my first post, I'm giving "true" in the AdMobBinding.init call. Should that be enough for me to get test ads if I've enabled it in my Site/App settings on the AdMob site (for all devices, as I have no need to do it per device at this point)? Because I've done that and seem to still be getting ads that don't look like test ads.
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tommi, that question is best asked directly to AdMob. All I can tell you is that it will set the testing flag to true/false.
     
  34. cms

    cms

    Joined:
    Sep 19, 2011
    Posts:
    43
    Thanks prime31.

    That's a good point. I'll get yours. Thanks.
     
  35. TommiH

    TommiH

    Joined:
    Jan 14, 2008
    Posts:
    253
    Alright, I went and did some research on AdMob sites, and on their forum I found this.

    So apparently for some reason the isTesting variable isn't working anymore...
     
  36. shawn_t

    shawn_t

    Joined:
    Feb 27, 2013
    Posts:
    5
    I have some minor issues with using the TapJoy plugin that perhaps others have experienced:

    1. When the banner ad refreshed (e.g. every 30 seconds) then the banner ad pops to the top-left and then returns to the desired position (e.g. bottom center). Perhaps a 1/2 second delay. I notice this on a first generation iPad more as it happens much faster on the iPad 2 and iPad 3
    2. When my application loses internet connectivity, a cached banner ad seems to pop to the top-left and stay there. I added some code to destroy the banner ad when the application loses internet connectivity which stops this issue, but this results in the following issue...NOTE: Interestingly, this seems to happen only on iPad 2 and iPad 3, but not on iPad 1!? On iPad the cached banner stays in my desired location (i.e. bottom center)
    3. When internet connectivity is re-established, I have code to re-enable the TapJoy banner. Unfortunately, on iPad 2 and iPad 3, the TapJoy banner doesn't seem to come back even after the application is paused and resumed. If I completely exit the application (i.e. remove it from the multi-tasking tray) and restart then the banner ad will reappear as desired. This problem doesn't seem to happen on iPad 1 as the banner reappears in the desired location (i.e. bottom center) as expected

    Any ideas?
     
  37. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    Hi there
    It seems adwhirl plugin is dead since the last update. My report console on adwhirl website shows that I'm having zero ads displayed, but I in fact see the ads on my device. This happens since I updated to the last prime31 plugin, so I'm actually worried that my ads are going to some other account and they are taking credit for it. My settings are fine and my init method has my adwhirl id and all as it used to, but the reporting is still blank since I upgraded.

    In my case, the ads are displayed (so I should take credit for them) but the reporting says nothing. So I went from over 120k ads a day to zero in the past week.

    Any idea what's going on? Rolling back to the previous version works just fine, it is only with the latest prime31 build.

    btw, you can check it out yourself, get Dogfight from Echoboom Apps on iTunes. It's free. You'll see ads on the main screen, those ads are the ones from adwhirl. So they are pulled and displayed. Now, my adwhirl console is dead flat since this update.
     
    Last edited: Mar 1, 2013
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @create, did you contact AdWhirl? What exactly do you think we can do about that? We do not have access to AdWhirls servers...
     
  39. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    yep, they said it must be something on the plugin. And it is true. If you roll back to the older version, i get reports on the stats. As soon as I upgrade to the newer version, they don't even get calls from me. Meaning I get no reports at all. It is as if the plugin is not sending my adwhirl id but giving those ads to someone else.
    Do you have any actual ios app using adwhirl+admod and getting reports info with the latest version?
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, the AdWhirl SDK provided is 100% unmodified. If ads are showing they are with total certainty getting your ID.
     
  41. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,739
    and you are 100% certain that the adwhirl id is passed in, right? i just don't understand why the older version would work and not the newer one :?
    anyone has the same issue?
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @create, here is a screenshot showing the exact delegate method used by AdWhirl to get the ID: http://cl.ly/NGue
     
  43. ElPato

    ElPato

    Joined:
    Mar 1, 2013
    Posts:
    2
    I used to have the same issue (#1 banner appearing at the top-left corner) I fixed it disabling banner autorefresh. Sadly Prim31 plugin don't give you the option to do so.... If you modified the file TapjoyManager.mm and change the return value of (BOOL)shouldRefreshAd method you should fix that issue... but your banner is not going to refresh, so you must call TapjoyBinding.refreshBanner() in your code every X seconds
     
  44. shawn_t

    shawn_t

    Joined:
    Feb 27, 2013
    Posts:
    5
    Thank you ElPato. This seems to have resolved all of the issues above.

    Prime could you consider exposing that shouldRefreshAd method in a future release?

    Thank you,

    Shawn
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @shawn, we will get it in the next update.
     
  46. DavidC02

    DavidC02

    Joined:
    Jul 19, 2011
    Posts:
    152
    Is the AdMob plugin available in the Asset Store? I can't seem to find it.
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @david, it is only available via our website.
     
  48. DavidC02

    DavidC02

    Joined:
    Jul 19, 2011
    Posts:
    152
    Is there any way to hide the ad, instead of destroy it? So it doesn't load a new one each time by creating it.

    Thanks.
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @david, no. Ads cannot be paused.
     
  50. DavidC02

    DavidC02

    Joined:
    Jul 19, 2011
    Posts:
    152
    I didn't mean pause, I meant hiding it, without destroying it.