Update Guide

This guide describes steps required when updating from one Tapjoy SDK version to another, it's recommended you perform all the steps to prevent any issues or conflicts.

14.0.0

  • Please replace uses of the deprecated Tapjoy.TrackPurchase method with new method Tapjoy.TrackPurchase(string currencyCode, double productPrice).

13.4.0

We added a new connectWarning callback. This will fire when there is a non-blocking issue during connect, connectSuccess will also fire after. Currently this feature will only detect issues with UserId when sent in ConnectFlags.

Tapjoy.OnConnectWarning += HandleConnectWarning;

void HandleConnectWarning(int code, string message)
{
    
}

13.2.0

Connect

We added error code & message parameters to connectFailure callback. The previous callback is now deprecated but still functional.

void Start() {	
    // Connect Delegates	
    Tapjoy.OnConnectSuccess += HandleConnectSuccess;	
    Tapjoy.OnConnectFailed += HandleConnectFailed;
	// Deprecated since 13.2.0	
    Tapjoy.OnConnectFailure += HandleConnectFailure;
    }
void OnDisable(){	
    // Connect Delegates	
    Tapjoy.OnConnectSuccess -= HandleConnectSuccess;	
    Tapjoy.OnConnectFailed -= HandleConnectFailed;
	// Deprecated since 13.2.0	
    Tapjoy.OnConnectFailure -= HandleConnectFailure;
    }
public void HandleConnectFailed(int code, string message){

}
// Deprecated since 13.2.0public void HandleConnectFailure(){
} 

Max User Level

It's now possible to set the number of levels in your game. It can be set before or after connect.

Tapjoy.SetMaxLevel(10); 

User Segment

You can now set the type of user currently using your app. This can be set before or after connect, or during the session.

Tapjoy.SetUserSegment(TJSegment.VIP);
Tapjoy.SetUserSegment(TJSegment.Payer);
Tapjoy.SetUserSegment(TJSegment.NonPayer);
Tapjoy.SetUserSegment(TJSegment.Unknown); 

Entry Point

Before calling request connect you can set the entry point. This describes where in the app the placement will be shown. You can choose from one of several preset values.

TJPlacement placement = TJPlacement.CreatePlacement("placementName");
placement.SetEntryPoint(TJEntryPoint.COMPLETE); 

// Available values
TJEntryPoint.UNKNOWN
TJEntryPoint.OTHER
TJEntryPoint.MAIN_MENU
TJEntryPoint.HUD
TJEntryPoint.EXIT
TJEntryPoint.FAIL
TJEntryPoint.COMPLETE
TJEntryPoint.INBOX
TJEntryPoint.INIT
TJEntryPoint.STORE 

Currency

  • Get/spend/earn will no longer accept negative values.
  • If self-managed currencies call the managed currency API's, an error will be returned.

You can now set the users balance before creating a placement. It must be set before requestContent.

TJPlacement placement = TJPlacement.CreatePlacement("placementName");
placement.SetCurrencyBalance("[CURRENCY_ID]", 100);

// Callbacks

void OnEnable() 
{	
    TJPlacement.OnSetCurrencyBalanceSuccess += HandleSetCurrencyBalanceSuccess;	
    TJPlacement.OnSetCurrencyBalanceFailure += HandleSetCurrencyBalanceFailure;	
}

void OnDisable() 
{	
    TJPlacement.OnSetCurrencyBalanceSuccess -= HandleSetCurrencyBalanceSuccess;	
    TJPlacement.OnSetCurrencyBalanceFailure -= HandleSetCurrencyBalanceFailure;
}

public void HandleSetCurrencyBalanceSuccess(TJPlacement placement) 
{

}

public void HandleSetCurrencyBalanceFailure(TJPlacement placement, int code, string error)
{

}

You can also set the amount of currency a user needs to achieve their goal on each placement.

TJPlacement placement = TJPlacement.CreatePlacement("placementName");
placement.SetRequiredAmount("[CURRENCY_ID]", 200); 

// Callbacks

void OnEnable() 
{	
    TJPlacement.OnSetCurrencyAmountRequiredSuccess += HandleSetRequiredAmountSuccess;	
    TJPlacement.OnSetCurrencyAmountRequiredFailure += HandleSetRequiredAmountFailure;}

void OnDisable() 
{	
    TJPlacement.OnSetCurrencyAmountRequiredSuccess -= HandleSetRequiredAmountSuccess;	
    TJPlacement.OnSetCurrencyAmountRequiredFailure -= HandleSetRequiredAmountFailure;
}

public void HandleSetCurrencyBalanceSuccess(TJPlacement placement)
{

}

public void HandleSetCurrencyBalanceFailure(TJPlacement placement, int code, string error)
{

}

public void HandleSetRequiredAmountSuccess(TJPlacement placement)
{

}
public void HandleSetRequiredAmountFailure(TJPlacement placement, int code, string error)
{

} 

12.8.1

Before updating please delete all of the Tapjoy and Google Play Services files from Assets > Plugins > Android.

The Tapjoy SDK is now managed via Maven by the External Dependency Manager (EDM). The EDM is included as part of the Tapjoy Unity Plugin and is required to support Android.

Custom Gradle Templates

If you are using a custom gradle template you must enable Jetifier.

If it is an option in the version of Unity Editor you are using, you must also use a custom gradle properties file.

12.8.0

Before updating please delete the Tapjoy.framework and the Resources folder under Assets > iOS.

The Tapjoy SDK is now managed via Cocoapods by the External Dependency Manager (EDM). The EDM is included as part of the Tapjoy Unity Plugin and is required to support iOS. Please ensure your Cocoapods version is 1.9.0 or greater and your Xcode version is 11.0 or greater.