ALPostbackDelegate.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // ALPostbackDelegate
  3. // AppLovinSDK
  4. //
  5. // Copyright © 2020 AppLovin Corporation. All rights reserved.
  6. //
  7. @class ALPostbackService;
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. * This protocol allows you to monitor the dispatching of postbacks to a developer-specified URL by the postback service.
  11. */
  12. @protocol ALPostbackDelegate <NSObject>
  13. /**
  14. * Indicates that a postback dispatched to a given URL completed successfully.
  15. *
  16. * Success means having received a 2<var>xx</var> response code from the remote endpoint.
  17. *
  18. * @param postbackService The postback service that made the postback call.
  19. * @param postbackURL The URL that was notified.
  20. */
  21. - (void)postbackService:(ALPostbackService *)postbackService didExecutePostback:(NSURL *)postbackURL;
  22. /**
  23. * Indicates that a postback dispatched to a given URL has failed.
  24. *
  25. * Failure means having received a response code outside the 2<var>xx</var> range, or having been unable to establish a connection.
  26. *
  27. * @param postbackService The postback service that attempted the postback call.
  28. * @param postbackURL The URL to which the notification attempt was made.
  29. * @param errorCode The HTTP status code received, if any; otherwise one of the negative constants defined in ALErrorCodes.h.
  30. */
  31. - (void)postbackService:(ALPostbackService *)postbackService didFailToExecutePostback:(nullable NSURL *)postbackURL errorCode:(NSInteger)errorCode;
  32. @end
  33. NS_ASSUME_NONNULL_END