Tapjoy lets you run ads and use virtual currency.
Check RTAdTest for an example, it's supported on Android and iOS.
Requires an AdManager object to be setup to use.
To initialize it, add:
//put this somewhere after m_adManager.Init(); is called AdManager::InitTapjoy("your tapjoyID", "your tapjoyAppSecretKey");
Android note: If the tapjoy info was manually set in android/src/Main.java, the android build will ignore this. (to keep compatibility with old projects that did it that way)
If you see a *“Error getting tapjoy ad - message - Tapjoy Ad request failed to receive any data.”* error in the log, chances are your ID isn't correct or you haven't added a “currency” yet in your tapjoy account. Tapjoy will NOT serve ads until you've setup currency or had the app specifically set by TJ to serve “Non-rewarded” ads. (You have to email them to do that)
NOTE These directions are for Tapjoy V8.X. They changed stuff in V9 and it doesn't work anymore.
However, a V9 version is also supported but is missing the show banner feature at the moment (my game doesn't use it.. so I'm waiting to add it). To use the V9 version, add TapjoyManagerV9.* instead of TapjoyManager.* below. Also, define RT_TAPJOY_V9 project wide, in addition to the normal RT_TAPJOY_ENABLED.
Download the Tapjoy iOS Publisher (+Virtual Goods) SDK and put the TapjoyConnectVirtualGoodsSDK_iOS directory in /shared/iOS.
Add the entire /shared/iOS/TapjoyConnectVirtualGoodsSDK/TapjoyConnect folder to your Xcode project. (Select the “Create Groups for any added folders” option)
Add the source files /shared/iOS/app/TapjoyManager.mm (and its .h) to your project.
Define the compiler environmental variable RT_TAPJOY_ENABLED to the project's xCode settings.
If you get link errors about the CoreTelephony, sqlite3, MPMoviePlayer libraries missing, you'll need to add them:
Go to your Xcode project settings and select Build Phases, exapand “Link Binary With Libraries”, click the plus sign to add the following libraries if you don't already have them:
Note: I got some strange errors in the Tapjoy SDK source about UIKit elements missing and had to add #import <UIKit/UIKit.h> in a few places in the Tapjoy source. Not sure why! Something setup differently in the RTAdTest project as compared to their example project I guess. Let me know if you know.
NOTE: Tapjoy 8.X is supported, but not the new V9 where they broke the API. Nobody wants to go into the java stuff and update it, so we're using the older version.
Download the Tapjoy Android Virtual Publishers SDK and copy the com/tapjoy directory to /shared/android/optional_src/com. (This is where Proton will expect to find the SDK files when doing the build)
Edit android/build_prepare.bat and uncomment the tapjoy lib copy so it looks like below:
:for tapjoy (optional) echo d | xcopy ..\..\shared\android\optional_src\com\tapjoy temp_final_src\com\tapjoy /E /F /Y
Edit android/src/Main.java and change:
// #define RT_TAPJOY_SUPPORT to //#define RT_TAPJOY_SUPPORT
Also look below in that file and change this to valid info:
TapjoyConnect.requestTapjoyConnect(getApplicationContext(), "replace with tapjoy app id", "replace with tapjoy app secret key");