ALCMPService.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // ALCMPService.h
  3. // AppLovinSDK
  4. //
  5. // Created by Thomas So on 7/26/23.
  6. //
  7. #import <Foundation/Foundation.h>
  8. @class ALCMPError;
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * This class provides direct APIs for interfacing with the Google-certified CMP installed, if any.
  12. */
  13. @interface ALCMPService : NSObject
  14. /**
  15. * @param error @c nil if the flow completed successfully. Otherwise, the error object contains more details about the reason for failure.
  16. */
  17. typedef void (^ALCMPCompletionHandler) (ALCMPError *_Nullable error);
  18. /**
  19. * Shows the CMP flow to an existing user.
  20. * Note that the user's current consent will be reset before the CMP alert is shown.
  21. *
  22. * @param completion The completion handler that will be called once the flow finishes showing.
  23. */
  24. - (void)showCMPForExistingUserWithCompletion:(ALCMPCompletionHandler)completion;
  25. /**
  26. * @return @c YES if a supported CMP is integrated.
  27. */
  28. - (BOOL)hasSupportedCMP;
  29. - (instancetype)init NS_UNAVAILABLE;
  30. + (instancetype)new NS_UNAVAILABLE;
  31. @end
  32. NS_ASSUME_NONNULL_END