The OfferToro SDK gives a possibility to be notified of events happening in the OfferWall lifecycle via delegate OfferToroDelegate.
[OfferToro sharedInstance].delegate = YOUR_DELEGATE
OfferToro.sharedInstance()?.delegate = YOUR_DELEGATE
Your delegate will be notified of all possible events listed below:
// Invoked when OfferWall is successfully initialized
- (void)offertoroOWInitFail:(NSError *)error;
// Invoked when OfferWall initialization fails
// Invoked when OfferWall is presented
// Invoked when OfferWall is dismissed
- (void)offertoroOWCredited:(NSNumber *)amount totalCredits:(NSNumber *)totalCredits;
// Automatically invoked every several minutes and returns user’s balance (totalCredits) and the amount of credits earned (amount) by the user since the last update.
It could also be updated on demand at any time by calling getOWTotalCredits method (described in Step 4. Reward your users section below).
The OfferWall module should be initialized on the application launch.
[[OfferToro sharedInstance] initOWWithAppId:APP_ID userId:USER_ID secretKey:SECRET_KEY behaviorType:BEHAVIOR_TYPE];
OfferToro.sharedInstance()?.initOW(withAppId: APP_ID, userId: USER_ID, secretKey: SECRET_KEY, behaviorType:BEHAVIOR_TYPE)
In case the behaviorType parameter was not passed, default behavior is BehaviorTypeClickOut
To present the OfferWall, presentOWInViewController method should be called:
[[OfferToro sharedInstance] presentOWInViewController:VIEW_CONTROLLER animation:YES];
OfferToro.sharedInstance()?.presentOW(inViewController: VIEW_CONTROLLER, animation: true)
OfferToro SDK supports two ways to reward your users. Those are:
User's balance and the amount of credits the user has recently earned are available via offertoroOWCredited delegate which is updated automatically every several minutes (described in Step 1. Implement your delegate section above). It could also be updated on demand at any time by calling getOWTotalCredits method:
[[OfferToro sharedInstance] getOWTotalCredits];
Server to Server postbacks is a more secure way to receive notifications, in order to reward your users.
To receive Server to Server postbacks, you must define your postback URL in your App Placement under your OfferToro account
For more information - Please check this page: