Offerwall Migration Guide
Transition from your existing ironSource Offerwall implementation in your app to the Tapjoy Offerwall by following step-by-step migration instructions.
Read time 3 minutesLast updated 3 hours ago
- First you need to integrate the ironSource Tapjoy adapter. You can add this to your podfile like so:
You can find the latest adapter version here.pod 'IronSourceTapjoyAdapter','4.1.23.1'
- The adapter comes with a copy of the Offerwall SDK so you can call Offerwall SDK functions directly. This is what we need to do to display the Tapjoy Offerwall. First, we need to import Tapjoy into your class:
#import <Tapjoy/TJPlacement.h>
- Then we need to initialise the Offerwall SDK. You will receive a callback when this succeeds (or fails), and you do not need to make any Offerwall SDK calls until you have received the success callback.
[Tapjoy connect:@"TJ_SDK_KEY"]; - (void)tjcConnectSuccess:(NSNotification *)notifyObj { NSLog(@"Tapjoy connect succeeded"); } - (void)tjcConnectFail:(NSNotification *)notifyObj { NSLog(@"Tapjoy connect failed"); }
- Next we create a placement object. A placement is something you configure on the Tapjoy dashboard and it will contain your Offerwall content card. In this example we are assuming you have named your placement ‘Offerwall’. In reality you can name it whatever you want but the name you use here in your code must match the dashboard.
TJPlacement *placement = [TJPlacement placementWithName:@"Offerwall" delegate:self];
- Now you are ready to request your placement. With this call we are loading the placement so it is ready when you choose to display it. An Offerwall placement should load quickly, but it’s best call this in advance of when you think you will display the Offerwall.
[p requestContent];
- We offer a range of callbacks that you can implement.
Some of these can replace the ironSource callbacks you might have already implemented. You can see the corresponding callbacks in the table below so that you can easily move any custom logic into the appropriate Tapjoy callbacks:- (void)requestDidSucceed:(TJPlacement*)placement{} - (void)requestDidFail:(TJPlacement*)placement error:(NSError*)error{} - (void)contentIsReady:(TJPlacement*)placement{} - (void)contentDidAppear:(TJPlacement*)placement{} - (void)contentDidDisappear:(TJPlacement*)placement{}
ironSource Callback | Tapjoy Callback |
---|---|
offerwallDidShow | contentDidAppear |
offerwallDidClose | contentDidDisappear |
offerwallHasChangedAvailability | contentIsReady |
requestDidSuceed
contentIsReady
- To display your Offerwall placement, check the content is ready, and then call showContent:
This will replace your existing ironSource call:if (placement.isContentReady) { [placement showContentWithViewController:nil]; }
The[IronSource showOfferwallWithViewController:UIViewController];
showContent
-
When the user has dismissed the Offerwall you must request the content again. You cannot show a placement multiple times. We would recommend that you request the placement in the callback so that it is ready to display again the next time a user requests it.
contentDidDisappear
- You can now remove any remaining ironSource Offerwall code. For example:
Also any callbacks that you did not convert to an equivalent Tapjoy version. If you specify[IronSource setOfferwallDelegate:yourOfferwallDelegate];
@[IS_OFFERWALL]
Privacy
If you are using Unity LevelPlay, you can use LevelPlay APIs to share with Tapjoy the following privacy flags:- GDPR consent.
- Opt-out of sale or share of personal information under US state privacy laws.
- Flagging specific end users as children. Note that if your app is primarily directed to children under COPPA you must flag all end users as children.