Mobclix integration

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Greetings,

    Here are instructions for getting Mobclix installed into your iOS project. Ive done this by modifying the exported iOS project code directly. Specifically, I have replaced the two source files that control iAds with new code that controls Mobclix. Most of the functions in the iAds library had analogues in the Mobclix SDK, so the conversion wasn't too bad.

    This is a hack, not a clean solution. Use at your own risk.


    To start, sign up for a Mobclix account. Download the SDK, and read their getting started guide. In particular, you will need to add the SDK folder to your Xcode project, and you will need to associate a few more frameworks with your project. Make sure to clean your build if things dont work out.

    Next, you'll need to replace two of Clickteam's code files with new versions I have prepared. Attached to this post, you'll find new versions of CIAdViewController.h and CIAdViewController.m

    In your Xcode project, inside /Classes/Application, backup the old versions of these files, and drop in these new replacements.

    Next, in the CIAdViewController.m, you'll find an initialization function with my personal Mobclix ID for a test app Im working on. Feel free to use this ID for testing/development purposes, but DO NOT distribute this ID or any software with it. If you want to use your own ID, register a new App and get an ID through the Mobclix dashboard. Furthermore, make sure to activate all the banner sizes you want, and enable test mode on them until you signup for actual ad services.

    Next, in the source code, uncomment the particular banner size you want to load up.

    This mostly seems to work, but I have NOT done extensive testing. Test banners appear in the right spots on the screen, but I haven't signed up for real ad services yet. Pause/Resume of the runtime seems to work when I click on ads.

    I do NOT know if the Mobclix ad refresh timer is getting properly paused when the application is no longer on the screen. There are a series of functions at the bottom of my source file that are supposed to handle cases in which the view is not visible, but I do not know if they are getting called. Perhaps someone with more Objective C experience can give pointers. If anything, I wish I could print something to 'standard out' to see when these are executing....

    EDIT: Just learned how to print to stdout - and indeed these calls are not executing, ever, it seems .... might not be a problem though ... stay tuned

    To those of you who want Mobclix, and have ObjC coding experience, please read my code and compare it with the old code. Read my comments to see what I'm not confident is working correctly. I only have 1-week of experience doing ObjC, so I'll need help testing and validating this code.

    This is 80% done - lets finish it.

    Additional things

    * Mobclix doesn't yet handle iAds automatically on iPad, so I probably wont be using this on my universal apps just yet. To get iAd working, we need to have more complicated code that tries iAds first and then calls mobclix as a backup. I dont know how to do this yet. I think it will need 2 separate view controllers ... and Im although Im sure we can use the
    didFailToReceiveAdWithError method to call Mobclix, Im not sure how to return to iAds at a later time.


    * I haven't tried this on an iPhone yet, nor have I tried portrait orientations. Landscape orientations on an iPad work well!

    Please login to see this attachment.

    Edited once, last by kinase (June 19, 2012 at 11:08 PM).

  • Update:

    Now that I know how to print status to the console in Xcode, I am able to spy on callback functions and see when they are executing.

    Good news: Mobclix ads are not refreshing when I exit my app and go to the home screen. The refresh behavior begins again when I open the app again. This is independent of the viewDidAppear and viewWillDisappear functions, as they are not ever called.

    Regarding the fly-out behavior of the ad banner, this works through the didFailToReceiveAdWithError function in the Mobclix SDK, however this function is evidently only called when I disable ads through the account dashboard. If however, I unplug my wireless router and kill the iPads network access, the banners stop loading. They do NOT recover when I restore network access. The existing banner remains in the displayed position in the game, since the FailToReceive function is not called in the event of a network problem. Mobclix documentation implies that it should be ...

    This is most likely a bug in the Mobclix SDK.

  • Hi guys, sorry I vanished for a while.... Phd sucks!

    Ill be getting back into this, now that I finally managed to get my iPod port of my latest game. Not sure if this will work with mmf standard. Im thinking it won't, since iAds only come with developer. Since Ive hacked mobclix directly into the same interface that iAds was using, I doubt those hooks will be in the code produced by mmf standard.

    It's been a while since I logged into my mobclix account, but I remember admob being in there. Ad whirl however is another aggregator, like mobclix, so I don't think it will work.

    Hopefully I'll get this integrated and tested soon, in the coming weeks. If I deploy it successfully, I'll report back

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!