#if 0 #elif defined(__arm64__) && __arm64__ // Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) #ifndef DIDOMI_SWIFT_H #define DIDOMI_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) # define __has_include(x) 0 #endif #if !defined(__has_attribute) # define __has_attribute(x) 0 #endif #if !defined(__has_feature) # define __has_feature(x) 0 #endif #if !defined(__has_warning) # define __has_warning(x) 0 #endif #if __has_include() # include #endif #pragma clang diagnostic ignored "-Wauto-import" #if defined(__OBJC__) #include #endif #if defined(__cplusplus) #include #include #include #include #include #include #include #else #include #include #include #include #endif #if defined(__cplusplus) #if __has_include() # include #else # ifndef __ptrauth_swift_value_witness_function_pointer # define __ptrauth_swift_value_witness_function_pointer(x) # endif #endif #endif #if !defined(SWIFT_TYPEDEFS) # define SWIFT_TYPEDEFS 1 # if __has_include() # include # elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; # endif typedef float swift_float2 __attribute__((__ext_vector_type__(2))); typedef float swift_float3 __attribute__((__ext_vector_type__(3))); typedef float swift_float4 __attribute__((__ext_vector_type__(4))); typedef double swift_double2 __attribute__((__ext_vector_type__(2))); typedef double swift_double3 __attribute__((__ext_vector_type__(3))); typedef double swift_double4 __attribute__((__ext_vector_type__(4))); typedef int swift_int2 __attribute__((__ext_vector_type__(2))); typedef int swift_int3 __attribute__((__ext_vector_type__(3))); typedef int swift_int4 __attribute__((__ext_vector_type__(4))); typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) # define SWIFT_PASTE_HELPER(x, y) x##y # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) # define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else # define SWIFT_CLASS_PROPERTY(...) # endif #endif #if !defined(SWIFT_RUNTIME_NAME) # if __has_attribute(objc_runtime_name) # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) # else # define SWIFT_RUNTIME_NAME(X) # endif #endif #if !defined(SWIFT_COMPILE_NAME) # if __has_attribute(swift_name) # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) # else # define SWIFT_COMPILE_NAME(X) # endif #endif #if !defined(SWIFT_METHOD_FAMILY) # if __has_attribute(objc_method_family) # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) # else # define SWIFT_METHOD_FAMILY(X) # endif #endif #if !defined(SWIFT_NOESCAPE) # if __has_attribute(noescape) # define SWIFT_NOESCAPE __attribute__((noescape)) # else # define SWIFT_NOESCAPE # endif #endif #if !defined(SWIFT_RELEASES_ARGUMENT) # if __has_attribute(ns_consumed) # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) # else # define SWIFT_RELEASES_ARGUMENT # endif #endif #if !defined(SWIFT_WARN_UNUSED_RESULT) # if __has_attribute(warn_unused_result) # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) # else # define SWIFT_WARN_UNUSED_RESULT # endif #endif #if !defined(SWIFT_NORETURN) # if __has_attribute(noreturn) # define SWIFT_NORETURN __attribute__((noreturn)) # else # define SWIFT_NORETURN # endif #endif #if !defined(SWIFT_CLASS_EXTRA) # define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) # define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) # define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if __has_attribute(objc_subclassing_restricted) # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # else # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # endif #endif #if !defined(SWIFT_RESILIENT_CLASS) # if __has_attribute(objc_class_stub) # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) # else # define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) # define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) # endif #endif #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) # if __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else # define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM_ATTR) # if __has_attribute(enum_extensibility) # define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) # else # define SWIFT_ENUM_ATTR(_extensibility) # endif #endif #if !defined(SWIFT_ENUM) # define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type # if __has_feature(generalized_swift_name) # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type # else # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) # endif #endif #if !defined(SWIFT_UNAVAILABLE) # define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) # define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) # define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if !defined(SWIFT_DEPRECATED_OBJC) # if __has_feature(attribute_diagnose_if_objc) # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) # else # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) # endif #endif #if defined(__OBJC__) #if !defined(IBSegueAction) # define IBSegueAction #endif #endif #if !defined(SWIFT_EXTERN) # if defined(__cplusplus) # define SWIFT_EXTERN extern "C" # else # define SWIFT_EXTERN extern # endif #endif #if !defined(SWIFT_CALL) # define SWIFT_CALL __attribute__((swiftcall)) #endif #if !defined(SWIFT_INDIRECT_RESULT) # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) #endif #if !defined(SWIFT_CONTEXT) # define SWIFT_CONTEXT __attribute__((swift_context)) #endif #if !defined(SWIFT_ERROR_RESULT) # define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) #endif #if defined(__cplusplus) # define SWIFT_NOEXCEPT noexcept #else # define SWIFT_NOEXCEPT #endif #if defined(_WIN32) #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) #endif #else #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) # define SWIFT_IMPORT_STDLIB_SYMBOL #endif #endif #if defined(__OBJC__) #if __has_feature(objc_modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" #endif @import Foundation; @import ObjectiveC; #endif #endif #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") # pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" #if __has_attribute(external_source_symbol) # pragma push_macro("any") # undef any # pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Didomi",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) # pragma pop_macro("any") #endif #if defined(__OBJC__) /// Consent status to a vendor or purpose. typedef SWIFT_ENUM(NSInteger, ConsentStatus, open) { ConsentStatusEnable = 0, ConsentStatusDisable = 1, ConsentStatusUnknown = 2, }; @class NSString; @class DDMCurrentUserStatusPurpose; @class DDMCurrentUserStatusVendor; enum Regulation : NSInteger; SWIFT_CLASS_NAMED("CurrentUserStatus") @interface DDMCurrentUserStatus : NSObject @property (nonatomic, readonly, copy) NSDictionary * _Nonnull purposes; @property (nonatomic, readonly, copy) NSDictionary * _Nonnull vendors; @property (nonatomic, readonly, copy) NSString * _Nonnull userID; @property (nonatomic, readonly, copy) NSString * _Nonnull created; @property (nonatomic, readonly, copy) NSString * _Nonnull updated; @property (nonatomic, readonly, copy) NSString * _Nonnull consentString; @property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; @property (nonatomic, readonly) enum Regulation regulation; @property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; - (nonnull instancetype)initWithPurposes:(NSDictionary * _Nonnull)purposes vendors:(NSDictionary * _Nonnull)vendors OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMCurrentUserStatus (SWIFT_EXTENSION(Didomi)) @end SWIFT_CLASS_NAMED("PurposeStatus") @interface DDMCurrentUserStatusPurpose : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull id; @property (nonatomic) BOOL enabled; - (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end SWIFT_CLASS_NAMED("VendorStatus") @interface DDMCurrentUserStatusVendor : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull id; @property (nonatomic) BOOL enabled; - (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end /// Class used to asynchronously enable and disable purposes and vendors through different methods. /// These changes will not be reflected on the user status until the commit method is called. SWIFT_CLASS("_TtC6Didomi28CurrentUserStatusTransaction") @interface CurrentUserStatusTransaction : NSObject /// Enable purposes based on an array of IDs. /// \param ids array of purpose IDs. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)enablePurposes:(NSArray * _Nonnull)ids; /// Enable vendors based on an array of IDs. /// \param ids array of vendor IDs. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)enableVendors:(NSArray * _Nonnull)ids; /// Enable a single purpose based on its ID. /// \param id purpose ID. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)enablePurpose:(NSString * _Nonnull)id; /// Enable a single vendor based on its ID. /// \param id vendor ID. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)enableVendor:(NSString * _Nonnull)id; /// Disable purposes based on an array of IDs. /// \param ids array of purpose IDs. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)disablePurposes:(NSArray * _Nonnull)ids; /// Disable vendors based on an array of IDs. /// \param ids array of vendor IDs. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)disableVendors:(NSArray * _Nonnull)ids; /// Disable a single purpose based on its ID. /// \param id purpose ID. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)disablePurpose:(NSString * _Nonnull)id; /// Disable a single vendor based on its ID. /// \param id vendor ID. /// /// /// returns: /// current instance of CurrentUserStatusTransaction. - (CurrentUserStatusTransaction * _Nonnull)disableVendor:(NSString * _Nonnull)id; /// Commit the user status changes made through the “enable” and “disable” methods. /// /// returns: /// true if user’s choices have been updated, false otherwise. - (BOOL)commit SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @protocol ViewProviderDelegate; @class DidomiInitializeParameters; @class DDMErrorEvent; @class DDMEventListener; @class DDMPurpose; @class DDMVendor; SWIFT_CLASS("_TtC6Didomi6Didomi") @interface Didomi : NSObject SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Didomi * _Nonnull shared;) + (Didomi * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT; + (void)setShared:(Didomi * _Nonnull)value; @property (nonatomic, weak) id _Nullable viewProviderDelegate; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; /// Initialize the Didomi SDK /// \param parameters object specifying parameters to initialize the SDK. /// - (void)initialize:(DidomiInitializeParameters * _Nonnull)parameters; /// Set custom user agent name and version. /// \param name Agent name. /// /// \param version Agent version. /// - (void)setUserAgentWithName:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; /// Set the user consent status. /// \param enabledPurposeIds set containing enabled purpose ids /// /// \param disabledPurposeIds set containing disabled purpose ids /// /// \param enabledVendorIds set containing enabled vendor ids /// /// \param disabledVendorIds set containing disabled purpose ids /// /// /// returns: /// true if consent status has been updated, false otherwise. - (BOOL)setUserConsentStatusWithEnabledPurposeIds:(NSSet * _Nonnull)enabledPurposeIds disabledPurposeIds:(NSSet * _Nonnull)disabledPurposeIds enabledVendorIds:(NSSet * _Nonnull)enabledVendorIds disabledVendorIds:(NSSet * _Nonnull)disabledVendorIds SWIFT_WARN_UNUSED_RESULT; /// Determine if the user is subject to a regulation that requires consent collection. /// This along with the choices that the user has or has not made /// will determine each time that the SDK is initialized if the notice should be displayed or not. /// /// returns: /// true if consent is required, false if it is not required. - (BOOL)isConsentRequired SWIFT_WARN_UNUSED_RESULT; /// Determine if consent information is available for all purposes and vendors that are required /// /// returns: /// true if consent is required and consent information is available, false otherwise. - (BOOL)isUserConsentStatusPartial SWIFT_WARN_UNUSED_RESULT; /// Determine if legitimate interest information is available for all purposes and vendors that are required /// /// returns: /// true if consent is required and legitimate interest information is available, false otherwise. - (BOOL)isUserLegitimateInterestStatusPartial SWIFT_WARN_UNUSED_RESULT; /// Set the user status for purposes and vendors for consent and legitimate interest. /// \param purposesConsentStatus boolean used to determine if consent will be enabled or disabled for all purposes. /// /// \param purposesLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all purposes. /// /// \param vendorsConsentStatus boolean used to determine if consent will be enabled or disabled for all vendors. /// /// \param vendorsLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all vendors. /// /// /// returns: /// true if consent status has been updated, false otherwise. - (BOOL)setUserStatusWithPurposesConsentStatus:(BOOL)purposesConsentStatus purposesLIStatus:(BOOL)purposesLIStatus vendorsConsentStatus:(BOOL)vendorsConsentStatus vendorsLIStatus:(BOOL)vendorsLIStatus; /// Set the user status for purposes and vendors for consent and legitimate interest. /// \param enabledConsentPurposeIds List of purpose IDs to enable for consent. /// /// \param disabledConsentPurposeIds List of purpose IDs to disable for consent. /// /// \param enabledLIPurposeIds List of purpose IDs to enable for LI. /// /// \param disabledLIPurposeIds List of purpose IDs to disable for LI. /// /// \param enabledConsentVendorIds List of vendor IDs to enable for consent. /// /// \param disabledConsentVendorIds List of vendor IDs to disable for consent. /// /// \param enabledLIVendorIds List of vendor IDs to enable for LI. /// /// \param disabledLIVendorIds List of vendor IDs to disable for LI. /// - (BOOL)setUserStatusWithEnabledConsentPurposeIds:(NSSet * _Nonnull)enabledConsentPurposeIds disabledConsentPurposeIds:(NSSet * _Nonnull)disabledConsentPurposeIds enabledLIPurposeIds:(NSSet * _Nonnull)enabledLIPurposeIds disabledLIPurposeIds:(NSSet * _Nonnull)disabledLIPurposeIds enabledConsentVendorIds:(NSSet * _Nonnull)enabledConsentVendorIds disabledConsentVendorIds:(NSSet * _Nonnull)disabledConsentVendorIds enabledLIVendorIds:(NSSet * _Nonnull)enabledLIVendorIds disabledLIVendorIds:(NSSet * _Nonnull)disabledLIVendorIds; /// Method that allows to enable consent and legitimate interest for all the required purposes. /// /// returns: /// true if consent status has been updated, false otherwise. - (BOOL)setUserAgreeToAll; /// Method that allows to disable consent and legitimate interest for all the required purposes and vendors. /// /// returns: /// true if consent status has been updated, false otherwise. - (BOOL)setUserDisagreeToAll; /// Provide a function that needs to be called once the SDK is ready /// Automatically call the function if the SDK is already ready (that’s why this is not a standard event) - (void)onReadyWithCallback:(void (^ _Nonnull)(void))callback; /// Accepts a closure that will be called if an unexpected situation occurs. /// \param callback closure to be called if an unexpected situation occurs. /// - (void)onErrorWithCallback:(void (^ _Nonnull)(DDMErrorEvent * _Nonnull))callback; /// Listen for changes on the status of a vendor. /// \param id vendor ID. /// /// \param callback callback to be executed when there are changes on the specified vendor. /// - (void)addVendorStatusListenerWithId:(NSString * _Nonnull)id :(void (^ _Nonnull)(DDMCurrentUserStatusVendor * _Nonnull))callback; /// Stop listening for changes on the status of a vendor. /// \param id vendor ID. /// - (void)removeVendorStatusListenerWithId:(NSString * _Nonnull)id; /// Remove all consents for the user - (void)reset; /// Get the configured purpose IDs /// @return - (NSSet * _Nonnull)getRequiredPurposeIds SWIFT_WARN_UNUSED_RESULT; /// Get the configured vendor IDs /// @return - (NSSet * _Nonnull)getRequiredVendorIds SWIFT_WARN_UNUSED_RESULT; /// Add an event listener /// \param listener listener to be added. /// - (void)addEventListenerWithListener:(DDMEventListener * _Nonnull)listener; /// Remove an event listener /// \param listener listener to be removed. /// - (void)removeEventListenerWithListener:(DDMEventListener * _Nonnull)listener; /// Is the Didomi SDK ready? - (BOOL)isReady SWIFT_WARN_UNUSED_RESULT; /// Method used to get an array of required purposes. /// /// returns: /// array of required purposes. - (NSArray * _Nonnull)getRequiredPurposes SWIFT_WARN_UNUSED_RESULT; /// Method used to get an array of required vendors. /// /// returns: /// array of required vendors. - (NSArray * _Nonnull)getRequiredVendors SWIFT_WARN_UNUSED_RESULT; /// Method used to get a Purpose based on its ID. /// \param purposeId purpose ID used in the search. /// /// /// returns: /// purpose found in the array. - (DDMPurpose * _Nullable)getPurposeWithPurposeId:(NSString * _Nonnull)purposeId SWIFT_WARN_UNUSED_RESULT; /// Method used to get a Vendor based on its ID. /// \param vendorId vendor ID used in the search. /// /// /// returns: /// vendor found in the array. - (DDMVendor * _Nullable)getVendorWithVendorId:(NSString * _Nonnull)vendorId SWIFT_WARN_UNUSED_RESULT; /// Get number of vendors. ///
    ///
  • /// Returns the count of all vendors ///
  • ///
- (NSInteger)getTotalVendorCount SWIFT_WARN_UNUSED_RESULT; /// Get number of IAB vendors ///
    ///
  • /// Returns the count of IAB vendors ///
  • ///
- (NSInteger)getIABVendorCount SWIFT_WARN_UNUSED_RESULT; /// Get number of non-IAB vendors ///
    ///
  • /// Returns the count of non-IAB vendors ///
  • ///
- (NSInteger)getNonIABVendorCount SWIFT_WARN_UNUSED_RESULT; /// Get JavaScript to embed into a WebView to pass the consent status from the app /// to the Didomi Web SDK embedded into the WebView /// Inject the returned JavaScript into a WebView /// \param extra Extra JavaScript to inject in the returned code /// /// /// returns: /// JavaScript code to inject in a WebView - (NSString * _Nonnull)getJavaScriptForWebViewWithExtra:(NSString * _Nonnull)extra SWIFT_WARN_UNUSED_RESULT; /// Get a query-string to add to the URL of a WebView or Chrome Custom Tab to pass the consent status from the app to the Didomi Web SDK embedded on the target URL. /// The returned parameter will have the format didomiConfig.user.externalConsent.value=... It includes the user consent information URL-encoded and JSON-encoded. /// Append the returned query-string parameter to the URL of your WebView or SFSafariViewController. /// See https://developers.didomi.io/cmp/mobile-sdk/share-consent-with-webviews for more information. /// /// returns: /// Query string parameter to append to URL - (NSString * _Nonnull)getQueryStringForWebView SWIFT_WARN_UNUSED_RESULT; /// Method used to update the selected language of the Didomi SDK and any property that depends on it. /// In most cases this method doesn’t need to be called. It would only be required for those apps that allow language change on-the-fly, i.e.: from within the app rather than from the device settings. /// In order to update the language of the views displayed by the Didomi SDK, this method needs to be called before these views are displayed. /// \param languageCode string containing the language code e.g.: “es”, “fr”, etc. /// - (void)updateSelectedLanguageWithLanguageCode:(NSString * _Nonnull)languageCode; @end typedef SWIFT_ENUM(NSInteger, Views, open) { ViewsPurposes = 0, ViewsSensitivePersonalInformation = 1, ViewsVendors = 2, }; @class UIViewController; /// Protocol used to provide the view controllers for the preferences/purposes and notice view. /// To provide customs views, this protocol will have to be implemented. /// This protocol is implemented by the Didomi singleton to provide the default view controllers. SWIFT_PROTOCOL("_TtP6Didomi20ViewProviderDelegate_") @protocol ViewProviderDelegate /// Method used to provide a view controller that will be used to display the notice. /// \param position string that represents the position of the notice (e.g.: bottom, popup, etc.). /// /// \param skipped Whether notice display is skipped and Preferences are displayed directly /// /// /// returns: /// the view controller associated to the notice. - (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; /// Method used to provide a view controller that will be used to display the preferences/purposes view. /// /// returns: /// the view controller associated to the preferences/purposes view. - (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; @end @interface Didomi (SWIFT_EXTENSION(Didomi)) - (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; - (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; @end @class UserAuthParams; @class DDMUserStatus; @interface Didomi (SWIFT_EXTENSION(Didomi)) /// Provide the objects required to display UI elements - (void)setupUIWithContainerController:(UIViewController * _Nonnull)containerController; /// Force show the consent notice without checking if consent is required /// Important: Do not keep a local reference to the View Controller itself as that could create a memory leak - (void)forceShowNotice; /// Show the consent notice (if required, not disabled in the config and not already displayed) - (void)showNotice; /// Hide the notice if it is currently displayed - (void)hideNotice; /// Check if the consent notice is currently displayed /// @return - (BOOL)isNoticeVisible SWIFT_WARN_UNUSED_RESULT; /// Check if the consent should be collected depending on if we have any consents or if we have some consents but the number of days before displaying the notice again has not expired yet /// /// returns: /// A boolean depending if the consent should be collected or not - (BOOL)shouldConsentBeCollected SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use shouldUserStatusBeCollected() instead."); /// Determine if the User Status (consent) should be collected or not. User Status should be collected if: ///
    ///
  • /// Regulation is different from NONE and ///
  • ///
  • /// User status is partial and ///
  • ///
  • /// The number of days before displaying the notice again has exceeded the limit specified on the Console or no User Status has been saved ///
  • ///
/// /// returns: /// A boolean depending if the User Status (consent) should be collected or not - (BOOL)shouldUserStatusBeCollected SWIFT_WARN_UNUSED_RESULT; /// Check if user status is partial /// /// returns: /// true if user status is partial, false otherwise - (BOOL)isUserStatusPartial SWIFT_WARN_UNUSED_RESULT; /// Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed. /// \param controller view controller from where preferences will be presented. /// /// \param view a value from Didomi.Views. It can be .purposes or .sensitivePersonalInformation or .vendors (ViewsPurposes or ViewsSensitivePersonalInformation or ViewsVendors in Objective-C) /// - (void)showPreferencesWithController:(UIViewController * _Nullable)controller view:(enum Views)view; /// Hide the preferences popup for purposes - (void)hidePreferences; /// Method used to check if the Preferences view is visible. /// /// returns: /// true if Preferences view is visible, false otherwise. - (BOOL)isPreferencesVisible SWIFT_WARN_UNUSED_RESULT; /// Method used to get a translated text based on the key being passed. /// The language and the source of this translated text will depend on the availability of the translation for the specific key. /// The language being used will be either the selected language of the SDK (based on device Locale and other parameters) or the language specified by app developers as the default language being used by the SDK. The source can be either the didomi_config.json file which can be either local or remote, or the didomi_master_config.json file which is bundled within the SDK. /// These are the attempts performed by the SDK to try to find a translation for the specific key: ///
    ///
  • /// Get translated value in user locale (selected language) from didomi_config.json (either local or remote). ///
  • ///
  • /// Get translated value in default locale (from the config) from didomi_config.json (either local or remote). ///
  • ///
  • /// Get translated value in user locale (selected language) from didomi_master_config.json (bundled within the Didomi SDK). ///
  • ///
  • /// Get translated value in default locale (from the config) from didomi_master_config.json (bundled within the Didomi SDK). ///
  • ///
/// If no translation can be found after these 4 attempts, the key will be returned. /// App developers can provide these translated texts through the didomi_config.json file (locally or remotely) in 3 different ways: ///
    ///
  • /// Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts ///
  • ///
  • /// Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text ///
  • ///
  • /// Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices ///
  • ///
/// \param key used to find its corresponding value in one of the different sources. /// /// /// returns: /// a translated string if a translation was found, the same key that was passed otherwise. - (NSString * _Nonnull)getTranslatedTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; /// Method used to get a dictionary/map in the form of { “en”: “Key in English”, “fr”: “Key in French.” } /// for a given key. /// \param key used to find its corresponding value in the dictionary/map. /// /// /// returns: /// dictionary containing the different translations for a given key. - (NSDictionary * _Nullable)getTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; /// Set the minimum level of messages to log /// Messages with a level below minLevel will not be logged. /// Levels are standard levels from OSLogType (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message): ///
    ///
  • /// OSLogType.info (1) ///
  • ///
  • /// OSLogType.debug (2) ///
  • ///
  • /// OSLogType.error (16) ///
  • ///
  • /// OSLogType.fault (17) ///
  • ///
/// We recommend setting OSLogType.error (16) in production /// \param minLevel Minimum level of messages to log /// - (void)setLogLevelWithMinLevel:(uint8_t)minLevel; /// Set organization user information /// \param id Organization user ID /// - (void)setUserWithId:(NSString * _Nonnull)id; /// Set organization user information and display consent notice if it is needed after synchronization /// \param id Organization user ID /// /// \param containerController View controller from which we can setup Didomi UI /// - (void)setUserWithId:(NSString * _Nonnull)id containerController:(UIViewController * _Nonnull)containerController; /// Set organization user information with authentication /// \param userAuthParams Organization user authentication params /// - (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams; /// Set organization user information with authentication, and display consent notice if it is needed after synchronization /// \param userAuthParams Organization user authentication params /// /// \param containerController View controller from which we can setup Didomi UI /// - (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams containerController:(UIViewController * _Nonnull)containerController; /// Remove organization user information (should be called when the SDK is initialized). - (void)clearUser; /// Get an instance of UserStatus containing all the information related to the user’s choices. - (DDMUserStatus * _Nonnull)getUserStatus SWIFT_WARN_UNUSED_RESULT; /// Get an instance of CurrentUserStatus containing all the information related to the user’s choices. - (DDMCurrentUserStatus * _Nonnull)getCurrentUserStatus SWIFT_WARN_UNUSED_RESULT; /// Save user’s choices. /// \param currentUserStatus instance of CurrentUserStatus containing the user’s choices. /// /// /// returns: /// true if user’s choices have been saved, false otherwise. - (BOOL)setCurrentUserStatusWithCurrentUserStatus:(DDMCurrentUserStatus * _Nonnull)currentUserStatus SWIFT_WARN_UNUSED_RESULT; /// Create an instance of theCurrentUserStatusTransaction class. /// This class is used to asynchronously enable and disable purposes and vendors through different methods. /// These changes will not be reflected on the user status until the commit method of the returned object is called. /// /// returns: /// an instance of the CurrentUserStatusTransaction class - (CurrentUserStatusTransaction * _Nonnull)openCurrentUserStatusTransaction SWIFT_WARN_UNUSED_RESULT; @end enum DDMErrorEventType : NSInteger; /// Type used to represent unexpected situations during SDK initialization. SWIFT_CLASS_NAMED("DidomiErrorEvent") @interface DDMErrorEvent : NSObject @property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; @property (nonatomic, readonly) enum DDMErrorEventType type; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end /// Enum used to represent a type for the DidomiErrorEvent class. typedef SWIFT_ENUM_NAMED(NSInteger, DDMErrorEventType, "DidomiErrorEventType", open) { DDMErrorEventTypeNilProperty = 0, DDMErrorEventTypeNotReady = 1, DDMErrorEventTypeFailedAlready = 2, DDMErrorEventTypeConfigFileError = 3, DDMErrorEventTypeInvalidApiKey = 4, }; /// Initialization parameters for Didomi SDK SWIFT_CLASS("_TtC6Didomi26DidomiInitializeParameters") @interface DidomiInitializeParameters : NSObject - (nonnull instancetype)initWithApiKey:(NSString * _Nonnull)apiKey localConfigurationPath:(NSString * _Nullable)localConfigurationPath remoteConfigurationURL:(NSString * _Nullable)remoteConfigurationURL providerID:(NSString * _Nullable)providerID disableDidomiRemoteConfig:(BOOL)disableDidomiRemoteConfig languageCode:(NSString * _Nullable)languageCode noticeID:(NSString * _Nullable)noticeID OBJC_DESIGNATED_INITIALIZER; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end enum DDMEventType : NSInteger; /// Class used as a listener for internal events occurred in the SDK. SWIFT_CLASS_NAMED("EventListener") @interface DDMEventListener : NSObject /// Closures used to execute code when the different events are triggered. /// Internal @property (nonatomic, copy) void (^ _Nonnull onConsentChanged)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onReady)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onError)(DDMErrorEvent * _Nonnull); /// Notice @property (nonatomic, copy) void (^ _Nonnull onHideNotice)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onShowNotice)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickAgree)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickDisagree)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickMoreInfo)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewVendors)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewSPIPurposes)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onNoticeClickPrivacyPolicy)(enum DDMEventType); /// Preferences @property (nonatomic, copy) void (^ _Nonnull onHidePreferences)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onShowPreferences)(enum DDMEventType); /// Preferences - Views @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewPurposes)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewVendors)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewSPIPurposes)(enum DDMEventType); /// Preferences - Purpose @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAll)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAll)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllPurposes)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllPurposes)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickResetAllPurposes)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeAgree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeDisagree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryAgree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryDisagree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSaveChoices)(enum DDMEventType); /// Preferences - Vendor @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllVendors)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllVendors)(enum DDMEventType); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorAgree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorDisagree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorSaveChoices)(enum DDMEventType); /// Preferences - Sensitive Personal Information @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeAgree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeDisagree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryAgree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryDisagree)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeSaveChoices)(enum DDMEventType); /// Sync @property (nonatomic, copy) void (^ _Nonnull onSyncDone)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onSyncError)(enum DDMEventType, NSString * _Nullable); /// Language @property (nonatomic, copy) void (^ _Nonnull onLanguageUpdated)(enum DDMEventType, NSString * _Nullable); @property (nonatomic, copy) void (^ _Nonnull onLanguageUpdateFailed)(enum DDMEventType, NSString * _Nullable); - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end /// Enum used to define the different type of internal events that can be triggered from the SDK. /// Please keep the current order because of Unity bridge. typedef SWIFT_ENUM_NAMED(NSInteger, DDMEventType, "EventType", open) { DDMEventTypeConsentChanged = 0, DDMEventTypeHideNotice = 1, DDMEventTypeReady = 2, DDMEventTypeShowNotice = 3, DDMEventTypeShowPreferences = 4, DDMEventTypeHidePreferences = 5, DDMEventTypeNoticeClickAgree = 6, DDMEventTypeNoticeClickDisagree = 7, DDMEventTypeNoticeClickMoreInfo = 8, DDMEventTypeNoticeClickViewVendors = 9, DDMEventTypeNoticeClickPrivacyPolicy = 10, DDMEventTypePreferencesClickAgreeToAll = 11, DDMEventTypePreferencesClickDisagreeToAll = 12, DDMEventTypePreferencesClickAgreeToAllPurposes = 13, DDMEventTypePreferencesClickDisagreeToAllPurposes = 14, DDMEventTypePreferencesClickResetAllPurposes = 15, DDMEventTypePreferencesClickAgreeToAllVendors = 16, DDMEventTypePreferencesClickDisagreeToAllVendors = 17, DDMEventTypePreferencesClickPurposeAgree = 18, DDMEventTypePreferencesClickPurposeDisagree = 19, DDMEventTypePreferencesClickCategoryAgree = 20, DDMEventTypePreferencesClickCategoryDisagree = 21, DDMEventTypePreferencesClickViewVendors = 22, DDMEventTypePreferencesClickViewPurposes = 23, DDMEventTypePreferencesClickSaveChoices = 24, DDMEventTypePreferencesClickVendorAgree = 25, DDMEventTypePreferencesClickVendorDisagree = 26, DDMEventTypePreferencesClickVendorSaveChoices = 27, /// Sync DDMEventTypeSyncDone = 28, DDMEventTypeSyncError = 29, /// Language DDMEventTypeLanguageUpdated = 30, DDMEventTypeLanguageUpdateFailed = 31, /// Preferences - Sensitive Personal Information DDMEventTypeNoticeClickViewSPIPurposes = 32, DDMEventTypePreferencesClickViewSPIPurposes = 33, DDMEventTypePreferencesClickSPIPurposeAgree = 34, DDMEventTypePreferencesClickSPIPurposeDisagree = 35, DDMEventTypePreferencesClickSPICategoryAgree = 36, DDMEventTypePreferencesClickSPICategoryDisagree = 37, DDMEventTypePreferencesClickSPIPurposeSaveChoices = 38, }; /// Public class representing a single Purpose configuration. SWIFT_CLASS_NAMED("Purpose") @interface DDMPurpose : NSObject /// Purpose id used by Didomi SDK. @property (nonatomic, readonly, copy) NSString * _Nonnull id; /// Purpose human-readable name, translated in selected language. @property (nonatomic, readonly, copy) NSString * _Nonnull name; /// Purpose description, translated in selected language. @property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; /// Initializer method for the Purpose class. /// \param id Purpose id used by Didomi SDK. /// /// \param name Purpose human-readable name, translated in selected language. /// /// \param descriptionText Purpose description, translated in selected language. /// - (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name descriptionText:(NSString * _Nonnull)descriptionText OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end /// Regulation for which Didomi SDK is currently configured. Only one regulation is active at each run. typedef SWIFT_ENUM(NSInteger, Regulation, open) { RegulationGdpr = 0, RegulationCcpa = 1, RegulationCpa = 2, RegulationCpra = 3, RegulationCtdpa = 4, RegulationUcpa = 5, RegulationVcdpa = 6, RegulationNone = 7, }; /// Protocol for User Authentication /// declare the user id SWIFT_PROTOCOL("_TtP6Didomi8UserAuth_") @protocol UserAuth /// Organization ID to associate with the user @property (nonatomic, readonly, copy) NSString * _Nonnull id; @end /// Protocol for User Authentication Parameters /// declare the common properties of encryption / hash parameters SWIFT_CLASS("_TtC6Didomi14UserAuthParams") @interface UserAuthParams : NSObject /// Organization ID to associate with the user @property (nonatomic, copy) NSString * _Nonnull id; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end /// User Authentication Parameters with encryption SWIFT_CLASS("_TtC6Didomi28UserAuthWithEncryptionParams") @interface UserAuthWithEncryptionParams : UserAuthParams - (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector; /// Initializer for Objective-C - (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector legacyExpiration:(NSTimeInterval)legacyExpiration; /// Initialization Vector used for computing the user ID @property (nonatomic, copy) NSString * _Nonnull initializationVector; @end /// User Authentication Parameters with hash SWIFT_CLASS("_TtC6Didomi22UserAuthWithHashParams") @interface UserAuthWithHashParams : UserAuthParams - (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt; /// Initializer for Objective-C - (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt legacyExpiration:(NSTimeInterval)legacyExpiration; /// Salt used for computing the user ID (optional) @property (nonatomic, copy) NSString * _Nullable salt; /// Digest used for representing the user ID @property (nonatomic, copy) NSString * _Nonnull digest; @end @class DDMUserStatusPurposes; @class DDMUserStatusVendors; SWIFT_CLASS_NAMED("UserStatus") @interface DDMUserStatus : NSObject @property (nonatomic, readonly, strong) DDMUserStatusPurposes * _Nonnull purposes; @property (nonatomic, readonly, strong) DDMUserStatusVendors * _Nonnull vendors; @property (nonatomic, readonly, copy) NSString * _Nonnull userID; @property (nonatomic, readonly, copy) NSString * _Nonnull created; @property (nonatomic, readonly, copy) NSString * _Nonnull updated; @property (nonatomic, readonly, copy) NSString * _Nonnull consentString; @property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; @property (nonatomic, readonly) enum Regulation regulation; @property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) @end @class DDMUserStatusIDs; SWIFT_CLASS_NAMED("Vendors") @interface DDMUserStatusVendors : NSObject @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalConsent; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalLegitimateInterest; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) @end SWIFT_CLASS_NAMED("IDs") @interface DDMUserStatusIDs : NSObject @property (nonatomic, readonly, copy) NSSet * _Nonnull enabled; @property (nonatomic, readonly, copy) NSSet * _Nonnull disabled; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) @end SWIFT_CLASS_NAMED("Purposes") @interface DDMUserStatusPurposes : NSObject @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; @property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; @property (nonatomic, readonly, copy) NSSet * _Nonnull essential; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class DDMVendorNamespaces; @class DDMVendorURL; /// Public class representing a single Vendor configuration. SWIFT_CLASS_NAMED("Vendor") @interface DDMVendor : NSObject /// Unique ID of the vendor provided by Didomi. This ID does not include prefixes. Example: “vendor-1”. @property (nonatomic, readonly, copy) NSString * _Nonnull id; /// Name of the vendor. @property (nonatomic, readonly, copy) NSString * _Nonnull name; /// Namespaces of the vendor (IAB, num) and their corresponding IDs. @property (nonatomic, readonly, strong) DDMVendorNamespaces * _Nullable namespaces; /// URL to the privacy policy of the vendor. @property (nonatomic, readonly, copy) NSString * _Nullable policyUrl; /// Purpose IDs that the vendor is operating under the consent legal basis. @property (nonatomic, readonly, copy) NSSet * _Nonnull purposeIDs; /// Purpose IDs that the vendor is operating under the legitimate interest legal basis. @property (nonatomic, readonly, copy) NSSet * _Nonnull legIntPurposeIDs; /// Set with IDs that represent features. @property (nonatomic, readonly, copy) NSSet * _Nonnull featureIDs; /// Set with IDs that represent flexible purposes. Introduced in IAB TCF v2. @property (nonatomic, readonly, copy) NSSet * _Nonnull flexiblePurposeIDs; /// Set with IDs that represent Special Purposes. Introduced in IAB TCF v2. @property (nonatomic, readonly, copy) NSSet * _Nonnull specialPurposeIDs; /// Set with IDs that represent Special Features. Introduced in IAB TCF v2. @property (nonatomic, readonly, copy) NSSet * _Nonnull specialFeatureIDs; /// Privacy policy and LI disclaimer urls. Introduced in IAB TCF v2.2. @property (nonatomic, readonly, copy) NSArray * _Nullable urls; /// Initializer method for the Purpose class. /// \param id Unique ID of the vendor. /// /// \param name Name of the vendor. /// /// \param policyUrl URL to the privacy policy of the vendor. /// /// \param namespaces Namespaces of the vendor (IAB, num) and their corresponding IDs. /// /// \param purposeIDs Purpose IDs that the vendor is operating under the consent legal basis. /// /// \param legIntPurposeIDs Purpose IDs that the vendor is operating under the legitimate interest legal basis. /// /// \param featureIDs Set with IDs that represent features. /// /// \param flexiblePurposeIDs Set with IDs that represent flexible purposes. /// /// \param specialPurposeIDs Set with IDs that represent Special Purposes. /// /// \param specialFeatureIDs Set with IDs that represent Special Features. /// /// \param urls Privacy policy and LI disclaimer urls. /// - (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name policyUrl:(NSString * _Nullable)policyUrl namespaces:(DDMVendorNamespaces * _Nullable)namespaces purposeIDs:(NSSet * _Nonnull)purposeIDs legIntPurposeIDs:(NSSet * _Nonnull)legIntPurposeIDs featureIDs:(NSSet * _Nonnull)featureIDs flexiblePurposeIDs:(NSSet * _Nonnull)flexiblePurposeIDs specialPurposeIDs:(NSSet * _Nonnull)specialPurposeIDs specialFeatureIDs:(NSSet * _Nonnull)specialFeatureIDs urls:(NSArray * _Nullable)urls OBJC_DESIGNATED_INITIALIZER; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMVendor (SWIFT_EXTENSION(Didomi)) @end /// Store additional IDs (IAB, num) for the Vendor. SWIFT_CLASS_NAMED("Namespaces") @interface DDMVendorNamespaces : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable iab2; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @interface DDMVendor (SWIFT_EXTENSION(Didomi)) @end /// Store localized URLs for privacy policy and LI claim. SWIFT_CLASS_NAMED("URL") @interface DDMVendorURL : NSObject @property (nonatomic, readonly, copy) NSString * _Nullable langID; @property (nonatomic, readonly, copy) NSString * _Nullable privacy; @property (nonatomic, readonly, copy) NSString * _Nullable legIntClaim; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end #endif #if defined(__cplusplus) #endif #if __has_attribute(external_source_symbol) # pragma clang attribute pop #endif #pragma clang diagnostic pop #endif #else #error unsupported Swift architecture #endif