Update Guide
Follow the Unity plugin Update Guide for steps to safely upgrade between SDK versions.
Read time 2 minutesLast updated 3 hours ago
This guide describes steps required when updating from one Offerwall SDK version to another, it's recommended you perform all the steps to prevent any issues or conflicts.
14.2.0
- Remove any use of the deprecated TJPlacement didClick callback. It will be removed in the next major version and no longer does anything.
- Remove any use of the deprecated getSupportUrl method. It will be removed in the next major version and no longer does anything.
14.0.0
- Replace uses of the deprecated method with new method
Tapjoy.TrackPurchase
.Tapjoy.TrackPurchase(string currencyCode, double productPrice)
13.4.0
We added a newconnectWarning
connectSuccess
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 also set the amount of currency a user needs to achieve their goal on each placement.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) { }
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 you update, delete all of the Tapjoy and Google Play Services files fromAssets > Plugins > 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 you update, delete the Tapjoy.framework and the Resources folder underAssets > iOS