User Tools

Site Tools


proton:admanager_tapjoy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
proton:admanager_tapjoy [2012/07/07 03:18] – created sethproton:admanager_tapjoy [2012/12/02 12:30] seth
Line 1: Line 1:
 === Tapjoy === === Tapjoy ===
-Fully supported on Android but not iOS, hassle Seth to write docs.  Check the RTLooneyLadder example for usage for now.+[[http://www.tapjoy.com|Tapjoy]] lets you run ads and use virtual currency. 
 + 
 +Check RTAdTest for an example, it'supported on Android and iOS. 
 + 
 +Requires an [[http://www.rtsoft.com/wiki/doku.php?id=proton:admanager|AdManager]] object to be setup to use. 
 + 
 +To initialize it, add: 
 +<code> 
 +//put this somewhere after m_adManager.Init(); is called 
 +AdManager::InitTapjoy("your tapjoyID", "your tapjoyAppSecretKey"); 
 +</code> 
 + 
 +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) 
 + 
 +== Troubleshooting == 
 + 
 +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) 
 + 
 +=== Enabling Tapjoy for iOS build === 
 +**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 missingyou'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: 
 + 
 +  * SystemConfiguration.framework  
 +  * libsqlite3.0.dylib  
 +  * CoreTelephony.framework - For compatibility with iOS 3.0, make this link Optional 
 +  * MediaPlayer.framework 
 + 
 +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. 
 + 
 +=== Enabling Tapjoy for Android build === 
 +**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: 
 + 
 +<code> 
 +:for tapjoy (optional) 
 +echo d | xcopy ..\..\shared\android\optional_src\com\tapjoy temp_final_src\com\tapjoy /E /F /Y 
 +</code> 
 + 
 +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: 
 +<code> 
 +TapjoyConnect.requestTapjoyConnect(getApplicationContext(), "replace with tapjoy app id", "replace with tapjoy app secret key"); 
 +</code>
proton/admanager_tapjoy.txt · Last modified: 2013/01/16 03:29 by seth