ISOfferwallDelegate.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // Copyright © 2017 IronSource. All rights reserved.
  3. //
  4. #ifndef IRONSOURCE_OFFERWALL_DELEGATE_H
  5. #define IRONSOURCE_OFFERWALL_DELEGATE_H
  6. #import <Foundation/Foundation.h>
  7. @protocol ISOfferwallDelegate <NSObject>
  8. @required
  9. /**
  10. Called after the offerwall has changed its availability.
  11. @param available The new offerwall availability. YES if available and ready to be shown, NO otherwise.
  12. */
  13. - (void)offerwallHasChangedAvailability:(BOOL)available;
  14. /**
  15. Called after the offerwall has been displayed on the screen.
  16. */
  17. - (void)offerwallDidShow;
  18. /**
  19. Called after the offerwall has attempted to show but failed.
  20. @param error The reason for the error.
  21. */
  22. - (void)offerwallDidFailToShowWithError:(NSError *)error;
  23. /**
  24. Called after the offerwall has been dismissed.
  25. */
  26. - (void)offerwallDidClose;
  27. /**
  28. @abstract Called each time the user completes an offer.
  29. @discussion creditInfo is a dictionary with the following key-value pairs:
  30. "credits" - (int) The number of credits the user has Earned since the last didReceiveOfferwallCredits event that returned YES. Note that the credits may represent multiple completions (see return parameter).
  31. "totalCredits" - (int) The total number of credits ever earned by the user.
  32. "totalCreditsFlag" - (BOOL) In some cases, we won’t be able to provide the exact amount of credits since the last event (specifically if the user clears the app’s data). In this case the ‘credits’ will be equal to the "totalCredits", and this flag will be YES.
  33. @param creditInfo Offerwall credit info.
  34. @return The publisher should return a BOOL stating if he handled this call (notified the user for example). if the return value is NO, the 'credits' value will be added to the next call.
  35. */
  36. - (BOOL)didReceiveOfferwallCredits:(NSDictionary *)creditInfo;
  37. /**
  38. Called after the 'offerwallCredits' method has attempted to retrieve user's credits info but failed.
  39. @param error The reason for the error.
  40. */
  41. - (void)didFailToReceiveOfferwallCreditsWithError:(NSError *)error;
  42. @end
  43. #endif