AATManagedConsent
@objc public class AATManagedConsent : AATConsentImplementation {
/// Create an instance of ``AATManagedConsent``
/// - Parameter cmp: an instance of ``AATCMPProtocol``. currently either AATCMPGoogle or AATCMPOgury
/// - Parameter delegate: The delegate that will be notified about CMP events. Must not be null.
@objc public init?(cmp: AATCMPProtocol?, delegate: AATManagedConsentDelegate)
/// Presents the consent screen ONLY if it is required by the used CMP (for example if no user consent has been set yet). It is advised always to call this method when the first app controller is presented.
/// - Parameter viewController: a view controller instance that will be used to present the CMP
@objc public func showIfNeeded(_ viewController: UIViewController)
/// Presents the consent screen, allowing the user to change consent settings
/// - Parameter viewController: a view controller instance that will be used to present the CMP
@objc public func editConsent(_ viewController: UIViewController)
/// Tells the CMP to reload. It does not need to be used unless some error occurs. You can call this method for example after receiving ``CMPFailedToLoad(with:)``.
/// - Parameter viewController: a view controller instance that will be used to present the CMP
@objc public func reload(_ viewController: UIViewController)
}
@interface AATManagedConsent : AATConsentImplementation
/// Initialize an instance of <code>AATManagedConsent</code>
/// \param cmp an instance of <code>AATCMPProtocol</code>. currently either AATCMPGoogle or AATCMPOgury
/// \param delegate The delegate that will be notified about CMP events. Must not be null.
- (nullable instancetype)initWithCmp:(id <AATCMPProtocol> _Nullable)cmp delegate:(id <AATManagedConsentDelegate> _Nonnull)delegate;
/// Presents the consent screen ONLY if it is required by the used CMP (for example if no user consent has been set yet). It is advised always to call this method when the first app controller is presented.
/// \param viewController a view controller instance that will be used to present the CMP
- (void)showIfNeeded:(UIViewController * _Nonnull)viewController;
/// Presents the consent screen, allowing the user to change consent settings
/// \param viewController a view controller instance that will be used to present the CMP
- (void)editConsent:(UIViewController * _Nonnull)viewController;
/// Tells the CMP to reload. It does not need to be used unless some error occurs. You can call this method for example after receiving <code>CMPFailedToLoad(with:)</code>.
/// \param viewController a view controller instance that will be used to present the CMP
- (void)reload:(UIViewController * _Nonnull)viewController;
@end
Last updated