No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UnityAdsShowDelegate.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #import <UnityAds/UnityAdsShowError.h>
  2. #import <UnityAds/UnityAdsShowCompletionState.h>
  3. NS_ASSUME_NONNULL_BEGIN
  4. /**
  5. * The `UnityAdsShowDelegate` defines the methods which will notify UnityAds show call
  6. * is either successfully completed with its completion state or failed with error category and error message
  7. */
  8. @protocol UnityAdsShowDelegate <NSObject>
  9. /**
  10. * Called when UnityAds completes show operation successfully for a placement with completion state.
  11. * @param placementId The ID of the placement as defined in Unity Ads admin tools.
  12. * @param state An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`.
  13. */
  14. - (void)unityAdsShowComplete: (NSString *)placementId withFinishState: (UnityAdsShowCompletionState)state;
  15. /**
  16. * Called when UnityAds has failed to show a specific placement with an error message and error category.
  17. * @param placementId The ID of the placement as defined in Unity Ads admin tools.
  18. * @param error
  19. * if `kUnityShowErrorNotInitialized`, show failed due to SDK not initialized.
  20. * if `kUnityShowErrorNotReady`, show failed due to placement not being ready.
  21. * if `kUnityShowErrorVideoPlayerError`, show failed due to video player.
  22. * if `kUnityShowErrorInvalidArgument`, show failed due to invalid arguments.
  23. * if `kUnityShowErrorNoConnection`, show failed due to internet connection.
  24. * if `kUnityShowErrorAlreadyShowing`, show failed due to ad is already being showen.
  25. * if `kUnityShowErrorInternalError`, show failed due to environment or internal services.
  26. * @param message A human readable error message
  27. */
  28. - (void)unityAdsShowFailed: (NSString *)placementId withError: (UnityAdsShowError)error withMessage: (NSString *)message;
  29. /**
  30. * Called when UnityAds has started to show ad with a specific placement.
  31. * @param placementId The ID of the placement as defined in Unity Ads admin tools.
  32. */
  33. - (void)unityAdsShowStart: (NSString *)placementId;
  34. /**
  35. * Called when UnityAds has received a click while showing ad with a specific placement.
  36. * @param placementId The ID of the placement as defined in Unity Ads admin tools.
  37. */
  38. - (void)unityAdsShowClick: (NSString *)placementId;
  39. @end
  40. NS_ASSUME_NONNULL_END