commit | author | age
|
09e73a
|
1 |
#if 0 |
L |
2 |
#elif defined(__arm64__) && __arm64__ |
|
3 |
// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) |
|
4 |
#ifndef DIDOMI_SWIFT_H |
|
5 |
#define DIDOMI_SWIFT_H |
|
6 |
#pragma clang diagnostic push |
|
7 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
8 |
|
|
9 |
#if !defined(__has_include) |
|
10 |
# define __has_include(x) 0 |
|
11 |
#endif |
|
12 |
#if !defined(__has_attribute) |
|
13 |
# define __has_attribute(x) 0 |
|
14 |
#endif |
|
15 |
#if !defined(__has_feature) |
|
16 |
# define __has_feature(x) 0 |
|
17 |
#endif |
|
18 |
#if !defined(__has_warning) |
|
19 |
# define __has_warning(x) 0 |
|
20 |
#endif |
|
21 |
|
|
22 |
#if __has_include(<swift/objc-prologue.h>) |
|
23 |
# include <swift/objc-prologue.h> |
|
24 |
#endif |
|
25 |
|
|
26 |
#pragma clang diagnostic ignored "-Wauto-import" |
|
27 |
#if defined(__OBJC__) |
|
28 |
#include <Foundation/Foundation.h> |
|
29 |
#endif |
|
30 |
#if defined(__cplusplus) |
|
31 |
#include <cstdint> |
|
32 |
#include <cstddef> |
|
33 |
#include <cstdbool> |
|
34 |
#include <cstring> |
|
35 |
#include <stdlib.h> |
|
36 |
#include <new> |
|
37 |
#include <type_traits> |
|
38 |
#else |
|
39 |
#include <stdint.h> |
|
40 |
#include <stddef.h> |
|
41 |
#include <stdbool.h> |
|
42 |
#include <string.h> |
|
43 |
#endif |
|
44 |
#if defined(__cplusplus) |
|
45 |
#if __has_include(<ptrauth.h>) |
|
46 |
# include <ptrauth.h> |
|
47 |
#else |
|
48 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
49 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
50 |
# endif |
|
51 |
#endif |
|
52 |
#endif |
|
53 |
|
|
54 |
#if !defined(SWIFT_TYPEDEFS) |
|
55 |
# define SWIFT_TYPEDEFS 1 |
|
56 |
# if __has_include(<uchar.h>) |
|
57 |
# include <uchar.h> |
|
58 |
# elif !defined(__cplusplus) |
|
59 |
typedef uint_least16_t char16_t; |
|
60 |
typedef uint_least32_t char32_t; |
|
61 |
# endif |
|
62 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
63 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
64 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
65 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
66 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
67 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
68 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
69 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
70 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
71 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
72 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
73 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
74 |
#endif |
|
75 |
|
|
76 |
#if !defined(SWIFT_PASTE) |
|
77 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
78 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
79 |
#endif |
|
80 |
#if !defined(SWIFT_METATYPE) |
|
81 |
# define SWIFT_METATYPE(X) Class |
|
82 |
#endif |
|
83 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
84 |
# if __has_feature(objc_class_property) |
|
85 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
86 |
# else |
|
87 |
# define SWIFT_CLASS_PROPERTY(...) |
|
88 |
# endif |
|
89 |
#endif |
|
90 |
#if !defined(SWIFT_RUNTIME_NAME) |
|
91 |
# if __has_attribute(objc_runtime_name) |
|
92 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
93 |
# else |
|
94 |
# define SWIFT_RUNTIME_NAME(X) |
|
95 |
# endif |
|
96 |
#endif |
|
97 |
#if !defined(SWIFT_COMPILE_NAME) |
|
98 |
# if __has_attribute(swift_name) |
|
99 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
100 |
# else |
|
101 |
# define SWIFT_COMPILE_NAME(X) |
|
102 |
# endif |
|
103 |
#endif |
|
104 |
#if !defined(SWIFT_METHOD_FAMILY) |
|
105 |
# if __has_attribute(objc_method_family) |
|
106 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
107 |
# else |
|
108 |
# define SWIFT_METHOD_FAMILY(X) |
|
109 |
# endif |
|
110 |
#endif |
|
111 |
#if !defined(SWIFT_NOESCAPE) |
|
112 |
# if __has_attribute(noescape) |
|
113 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
114 |
# else |
|
115 |
# define SWIFT_NOESCAPE |
|
116 |
# endif |
|
117 |
#endif |
|
118 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
|
119 |
# if __has_attribute(ns_consumed) |
|
120 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
121 |
# else |
|
122 |
# define SWIFT_RELEASES_ARGUMENT |
|
123 |
# endif |
|
124 |
#endif |
|
125 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
|
126 |
# if __has_attribute(warn_unused_result) |
|
127 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
128 |
# else |
|
129 |
# define SWIFT_WARN_UNUSED_RESULT |
|
130 |
# endif |
|
131 |
#endif |
|
132 |
#if !defined(SWIFT_NORETURN) |
|
133 |
# if __has_attribute(noreturn) |
|
134 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
135 |
# else |
|
136 |
# define SWIFT_NORETURN |
|
137 |
# endif |
|
138 |
#endif |
|
139 |
#if !defined(SWIFT_CLASS_EXTRA) |
|
140 |
# define SWIFT_CLASS_EXTRA |
|
141 |
#endif |
|
142 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
|
143 |
# define SWIFT_PROTOCOL_EXTRA |
|
144 |
#endif |
|
145 |
#if !defined(SWIFT_ENUM_EXTRA) |
|
146 |
# define SWIFT_ENUM_EXTRA |
|
147 |
#endif |
|
148 |
#if !defined(SWIFT_CLASS) |
|
149 |
# if __has_attribute(objc_subclassing_restricted) |
|
150 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
151 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
152 |
# else |
|
153 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
154 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
155 |
# endif |
|
156 |
#endif |
|
157 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
158 |
# if __has_attribute(objc_class_stub) |
|
159 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
160 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
161 |
# else |
|
162 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
163 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
164 |
# endif |
|
165 |
#endif |
|
166 |
#if !defined(SWIFT_PROTOCOL) |
|
167 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
168 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
169 |
#endif |
|
170 |
#if !defined(SWIFT_EXTENSION) |
|
171 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
172 |
#endif |
|
173 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
174 |
# if __has_attribute(objc_designated_initializer) |
|
175 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
176 |
# else |
|
177 |
# define OBJC_DESIGNATED_INITIALIZER |
|
178 |
# endif |
|
179 |
#endif |
|
180 |
#if !defined(SWIFT_ENUM_ATTR) |
|
181 |
# if __has_attribute(enum_extensibility) |
|
182 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
|
183 |
# else |
|
184 |
# define SWIFT_ENUM_ATTR(_extensibility) |
|
185 |
# endif |
|
186 |
#endif |
|
187 |
#if !defined(SWIFT_ENUM) |
|
188 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
189 |
# if __has_feature(generalized_swift_name) |
|
190 |
# 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 |
|
191 |
# else |
|
192 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
193 |
# endif |
|
194 |
#endif |
|
195 |
#if !defined(SWIFT_UNAVAILABLE) |
|
196 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
197 |
#endif |
|
198 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
199 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
200 |
#endif |
|
201 |
#if !defined(SWIFT_AVAILABILITY) |
|
202 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
203 |
#endif |
|
204 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
205 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
206 |
#endif |
|
207 |
#if !defined(SWIFT_DEPRECATED) |
|
208 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
209 |
#endif |
|
210 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
211 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
212 |
#endif |
|
213 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
|
214 |
# if __has_feature(attribute_diagnose_if_objc) |
|
215 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
216 |
# else |
|
217 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
218 |
# endif |
|
219 |
#endif |
|
220 |
#if defined(__OBJC__) |
|
221 |
#if !defined(IBSegueAction) |
|
222 |
# define IBSegueAction |
|
223 |
#endif |
|
224 |
#endif |
|
225 |
#if !defined(SWIFT_EXTERN) |
|
226 |
# if defined(__cplusplus) |
|
227 |
# define SWIFT_EXTERN extern "C" |
|
228 |
# else |
|
229 |
# define SWIFT_EXTERN extern |
|
230 |
# endif |
|
231 |
#endif |
|
232 |
#if !defined(SWIFT_CALL) |
|
233 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
234 |
#endif |
|
235 |
#if !defined(SWIFT_INDIRECT_RESULT) |
|
236 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
|
237 |
#endif |
|
238 |
#if !defined(SWIFT_CONTEXT) |
|
239 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
240 |
#endif |
|
241 |
#if !defined(SWIFT_ERROR_RESULT) |
|
242 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
243 |
#endif |
|
244 |
#if defined(__cplusplus) |
|
245 |
# define SWIFT_NOEXCEPT noexcept |
|
246 |
#else |
|
247 |
# define SWIFT_NOEXCEPT |
|
248 |
#endif |
|
249 |
#if defined(_WIN32) |
|
250 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
251 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
252 |
#endif |
|
253 |
#else |
|
254 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
255 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
|
256 |
#endif |
|
257 |
#endif |
|
258 |
#if defined(__OBJC__) |
|
259 |
#if __has_feature(objc_modules) |
|
260 |
#if __has_warning("-Watimport-in-framework-header") |
|
261 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
262 |
#endif |
|
263 |
@import Foundation; |
|
264 |
@import ObjectiveC; |
|
265 |
#endif |
|
266 |
|
|
267 |
#endif |
|
268 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
|
269 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
270 |
#if __has_warning("-Wpragma-clang-attribute") |
|
271 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
272 |
#endif |
|
273 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
274 |
#pragma clang diagnostic ignored "-Wnullability" |
|
275 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
|
276 |
|
|
277 |
#if __has_attribute(external_source_symbol) |
|
278 |
# pragma push_macro("any") |
|
279 |
# undef any |
|
280 |
# 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)) |
|
281 |
# pragma pop_macro("any") |
|
282 |
#endif |
|
283 |
|
|
284 |
#if defined(__OBJC__) |
|
285 |
|
|
286 |
/// Consent status to a vendor or purpose. |
|
287 |
typedef SWIFT_ENUM(NSInteger, ConsentStatus, open) { |
|
288 |
ConsentStatusEnable = 0, |
|
289 |
ConsentStatusDisable = 1, |
|
290 |
ConsentStatusUnknown = 2, |
|
291 |
}; |
|
292 |
|
|
293 |
@class NSString; |
|
294 |
@class DDMCurrentUserStatusPurpose; |
|
295 |
@class DDMCurrentUserStatusVendor; |
|
296 |
enum Regulation : NSInteger; |
|
297 |
|
|
298 |
SWIFT_CLASS_NAMED("CurrentUserStatus") |
|
299 |
@interface DDMCurrentUserStatus : NSObject |
|
300 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull purposes; |
|
301 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull vendors; |
|
302 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
303 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
304 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
305 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
306 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
307 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
308 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
309 |
- (nonnull instancetype)initWithPurposes:(NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull)purposes vendors:(NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull)vendors OBJC_DESIGNATED_INITIALIZER; |
|
310 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
311 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
312 |
@end |
|
313 |
|
|
314 |
|
|
315 |
@interface DDMCurrentUserStatus (SWIFT_EXTENSION(Didomi)) |
|
316 |
@end |
|
317 |
|
|
318 |
|
|
319 |
SWIFT_CLASS_NAMED("PurposeStatus") |
|
320 |
@interface DDMCurrentUserStatusPurpose : NSObject |
|
321 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
322 |
@property (nonatomic) BOOL enabled; |
|
323 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
324 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
325 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
326 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
327 |
@end |
|
328 |
|
|
329 |
|
|
330 |
SWIFT_CLASS_NAMED("VendorStatus") |
|
331 |
@interface DDMCurrentUserStatusVendor : NSObject |
|
332 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
333 |
@property (nonatomic) BOOL enabled; |
|
334 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
335 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
336 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
337 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
338 |
@end |
|
339 |
|
|
340 |
|
|
341 |
/// Class used to asynchronously enable and disable purposes and vendors through different methods. |
|
342 |
/// These changes will not be reflected on the user status until the <code>commit</code> method is called. |
|
343 |
SWIFT_CLASS("_TtC6Didomi28CurrentUserStatusTransaction") |
|
344 |
@interface CurrentUserStatusTransaction : NSObject |
|
345 |
/// Enable purposes based on an array of IDs. |
|
346 |
/// \param ids array of purpose IDs. |
|
347 |
/// |
|
348 |
/// |
|
349 |
/// returns: |
|
350 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
351 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
352 |
/// Enable vendors based on an array of IDs. |
|
353 |
/// \param ids array of vendor IDs. |
|
354 |
/// |
|
355 |
/// |
|
356 |
/// returns: |
|
357 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
358 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
359 |
/// Enable a single purpose based on its ID. |
|
360 |
/// \param id purpose ID. |
|
361 |
/// |
|
362 |
/// |
|
363 |
/// returns: |
|
364 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
365 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurpose:(NSString * _Nonnull)id; |
|
366 |
/// Enable a single vendor based on its ID. |
|
367 |
/// \param id vendor ID. |
|
368 |
/// |
|
369 |
/// |
|
370 |
/// returns: |
|
371 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
372 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendor:(NSString * _Nonnull)id; |
|
373 |
/// Disable purposes based on an array of IDs. |
|
374 |
/// \param ids array of purpose IDs. |
|
375 |
/// |
|
376 |
/// |
|
377 |
/// returns: |
|
378 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
379 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
380 |
/// Disable vendors based on an array of IDs. |
|
381 |
/// \param ids array of vendor IDs. |
|
382 |
/// |
|
383 |
/// |
|
384 |
/// returns: |
|
385 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
386 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
387 |
/// Disable a single purpose based on its ID. |
|
388 |
/// \param id purpose ID. |
|
389 |
/// |
|
390 |
/// |
|
391 |
/// returns: |
|
392 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
393 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurpose:(NSString * _Nonnull)id; |
|
394 |
/// Disable a single vendor based on its ID. |
|
395 |
/// \param id vendor ID. |
|
396 |
/// |
|
397 |
/// |
|
398 |
/// returns: |
|
399 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
400 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendor:(NSString * _Nonnull)id; |
|
401 |
/// Commit the user status changes made through the “enable” and “disable” methods. |
|
402 |
/// |
|
403 |
/// returns: |
|
404 |
/// <em>true</em> if user’s choices have been updated, <em>false</em> otherwise. |
|
405 |
- (BOOL)commit SWIFT_WARN_UNUSED_RESULT; |
|
406 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
407 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
408 |
@end |
|
409 |
|
|
410 |
|
|
411 |
@protocol ViewProviderDelegate; |
|
412 |
@class DidomiInitializeParameters; |
|
413 |
@class DDMErrorEvent; |
|
414 |
@class DDMEventListener; |
|
415 |
@class DDMPurpose; |
|
416 |
@class DDMVendor; |
|
417 |
|
|
418 |
SWIFT_CLASS("_TtC6Didomi6Didomi") |
|
419 |
@interface Didomi : NSObject |
|
420 |
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Didomi * _Nonnull shared;) |
|
421 |
+ (Didomi * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT; |
|
422 |
+ (void)setShared:(Didomi * _Nonnull)value; |
|
423 |
@property (nonatomic, weak) id <ViewProviderDelegate> _Nullable viewProviderDelegate; |
|
424 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
425 |
/// Initialize the Didomi SDK |
|
426 |
/// \param parameters object specifying parameters to initialize the SDK. |
|
427 |
/// |
|
428 |
- (void)initialize:(DidomiInitializeParameters * _Nonnull)parameters; |
|
429 |
/// Set custom user agent name and version. |
|
430 |
/// \param name Agent name. |
|
431 |
/// |
|
432 |
/// \param version Agent version. |
|
433 |
/// |
|
434 |
- (void)setUserAgentWithName:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; |
|
435 |
/// Set the user consent status. |
|
436 |
/// \param enabledPurposeIds set containing <em>enabled purpose ids</em> |
|
437 |
/// |
|
438 |
/// \param disabledPurposeIds set containing <em>disabled purpose ids</em> |
|
439 |
/// |
|
440 |
/// \param enabledVendorIds set containing <em>enabled vendor ids</em> |
|
441 |
/// |
|
442 |
/// \param disabledVendorIds set containing <em>disabled purpose ids</em> |
|
443 |
/// |
|
444 |
/// |
|
445 |
/// returns: |
|
446 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
447 |
- (BOOL)setUserConsentStatusWithEnabledPurposeIds:(NSSet<NSString *> * _Nonnull)enabledPurposeIds disabledPurposeIds:(NSSet<NSString *> * _Nonnull)disabledPurposeIds enabledVendorIds:(NSSet<NSString *> * _Nonnull)enabledVendorIds disabledVendorIds:(NSSet<NSString *> * _Nonnull)disabledVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
448 |
/// Determine if the user is subject to a regulation that requires consent collection. |
|
449 |
/// This along with the choices that the user has or has not made |
|
450 |
/// will determine each time that the SDK is initialized if the notice should be displayed or not. |
|
451 |
/// |
|
452 |
/// returns: |
|
453 |
/// <em>true</em> if consent is required, <em>false</em> if it is not required. |
|
454 |
- (BOOL)isConsentRequired SWIFT_WARN_UNUSED_RESULT; |
|
455 |
/// Determine if consent information is available for all purposes and vendors that are required |
|
456 |
/// |
|
457 |
/// returns: |
|
458 |
/// <em>true</em> if consent is required and consent information is available, <em>false</em> otherwise. |
|
459 |
- (BOOL)isUserConsentStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
460 |
/// Determine if legitimate interest information is available for all purposes and vendors that are required |
|
461 |
/// |
|
462 |
/// returns: |
|
463 |
/// <em>true</em> if consent is required and legitimate interest information is available, <em>false</em> otherwise. |
|
464 |
- (BOOL)isUserLegitimateInterestStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
465 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
466 |
/// \param purposesConsentStatus boolean used to determine if consent will be enabled or disabled for all purposes. |
|
467 |
/// |
|
468 |
/// \param purposesLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all purposes. |
|
469 |
/// |
|
470 |
/// \param vendorsConsentStatus boolean used to determine if consent will be enabled or disabled for all vendors. |
|
471 |
/// |
|
472 |
/// \param vendorsLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all vendors. |
|
473 |
/// |
|
474 |
/// |
|
475 |
/// returns: |
|
476 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
477 |
- (BOOL)setUserStatusWithPurposesConsentStatus:(BOOL)purposesConsentStatus purposesLIStatus:(BOOL)purposesLIStatus vendorsConsentStatus:(BOOL)vendorsConsentStatus vendorsLIStatus:(BOOL)vendorsLIStatus; |
|
478 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
479 |
/// \param enabledConsentPurposeIds List of purpose IDs to enable for consent. |
|
480 |
/// |
|
481 |
/// \param disabledConsentPurposeIds List of purpose IDs to disable for consent. |
|
482 |
/// |
|
483 |
/// \param enabledLIPurposeIds List of purpose IDs to enable for LI. |
|
484 |
/// |
|
485 |
/// \param disabledLIPurposeIds List of purpose IDs to disable for LI. |
|
486 |
/// |
|
487 |
/// \param enabledConsentVendorIds List of vendor IDs to enable for consent. |
|
488 |
/// |
|
489 |
/// \param disabledConsentVendorIds List of vendor IDs to disable for consent. |
|
490 |
/// |
|
491 |
/// \param enabledLIVendorIds List of vendor IDs to enable for LI. |
|
492 |
/// |
|
493 |
/// \param disabledLIVendorIds List of vendor IDs to disable for LI. |
|
494 |
/// |
|
495 |
- (BOOL)setUserStatusWithEnabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)enabledConsentPurposeIds disabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)disabledConsentPurposeIds enabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)enabledLIPurposeIds disabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)disabledLIPurposeIds enabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)enabledConsentVendorIds disabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)disabledConsentVendorIds enabledLIVendorIds:(NSSet<NSString *> * _Nonnull)enabledLIVendorIds disabledLIVendorIds:(NSSet<NSString *> * _Nonnull)disabledLIVendorIds; |
|
496 |
/// Method that allows to enable consent and legitimate interest for all the required purposes. |
|
497 |
/// |
|
498 |
/// returns: |
|
499 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
500 |
- (BOOL)setUserAgreeToAll; |
|
501 |
/// Method that allows to disable consent and legitimate interest for all the required purposes and vendors. |
|
502 |
/// |
|
503 |
/// returns: |
|
504 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
505 |
- (BOOL)setUserDisagreeToAll; |
|
506 |
/// Provide a function that needs to be called once the SDK is ready |
|
507 |
/// Automatically call the function if the SDK is already ready (that’s why this is not a standard event) |
|
508 |
- (void)onReadyWithCallback:(void (^ _Nonnull)(void))callback; |
|
509 |
/// Accepts a closure that will be called if an unexpected situation occurs. |
|
510 |
/// \param callback closure to be called if an unexpected situation occurs. |
|
511 |
/// |
|
512 |
- (void)onErrorWithCallback:(void (^ _Nonnull)(DDMErrorEvent * _Nonnull))callback; |
|
513 |
/// Listen for changes on the status of a vendor. |
|
514 |
/// \param id vendor ID. |
|
515 |
/// |
|
516 |
/// \param callback callback to be executed when there are changes on the specified vendor. |
|
517 |
/// |
|
518 |
- (void)addVendorStatusListenerWithId:(NSString * _Nonnull)id :(void (^ _Nonnull)(DDMCurrentUserStatusVendor * _Nonnull))callback; |
|
519 |
/// Stop listening for changes on the status of a vendor. |
|
520 |
/// \param id vendor ID. |
|
521 |
/// |
|
522 |
- (void)removeVendorStatusListenerWithId:(NSString * _Nonnull)id; |
|
523 |
/// Remove all consents for the user |
|
524 |
- (void)reset; |
|
525 |
/// Get the configured purpose IDs |
|
526 |
/// @return |
|
527 |
- (NSSet<NSString *> * _Nonnull)getRequiredPurposeIds SWIFT_WARN_UNUSED_RESULT; |
|
528 |
/// Get the configured vendor IDs |
|
529 |
/// @return |
|
530 |
- (NSSet<NSString *> * _Nonnull)getRequiredVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
531 |
/// Add an event listener |
|
532 |
/// \param listener listener to be added. |
|
533 |
/// |
|
534 |
- (void)addEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
535 |
/// Remove an event listener |
|
536 |
/// \param listener listener to be removed. |
|
537 |
/// |
|
538 |
- (void)removeEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
539 |
/// Is the Didomi SDK ready? |
|
540 |
- (BOOL)isReady SWIFT_WARN_UNUSED_RESULT; |
|
541 |
/// Method used to get an array of required purposes. |
|
542 |
/// |
|
543 |
/// returns: |
|
544 |
/// array of required purposes. |
|
545 |
- (NSArray<DDMPurpose *> * _Nonnull)getRequiredPurposes SWIFT_WARN_UNUSED_RESULT; |
|
546 |
/// Method used to get an array of required vendors. |
|
547 |
/// |
|
548 |
/// returns: |
|
549 |
/// array of required vendors. |
|
550 |
- (NSArray<DDMVendor *> * _Nonnull)getRequiredVendors SWIFT_WARN_UNUSED_RESULT; |
|
551 |
/// Method used to get a Purpose based on its ID. |
|
552 |
/// \param purposeId purpose ID used in the search. |
|
553 |
/// |
|
554 |
/// |
|
555 |
/// returns: |
|
556 |
/// purpose found in the array. |
|
557 |
- (DDMPurpose * _Nullable)getPurposeWithPurposeId:(NSString * _Nonnull)purposeId SWIFT_WARN_UNUSED_RESULT; |
|
558 |
/// Method used to get a Vendor based on its ID. |
|
559 |
/// \param vendorId vendor ID used in the search. |
|
560 |
/// |
|
561 |
/// |
|
562 |
/// returns: |
|
563 |
/// vendor found in the array. |
|
564 |
- (DDMVendor * _Nullable)getVendorWithVendorId:(NSString * _Nonnull)vendorId SWIFT_WARN_UNUSED_RESULT; |
|
565 |
/// Get number of vendors. |
|
566 |
/// <ul> |
|
567 |
/// <li> |
|
568 |
/// Returns the count of all vendors |
|
569 |
/// </li> |
|
570 |
/// </ul> |
|
571 |
- (NSInteger)getTotalVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
572 |
/// Get number of IAB vendors |
|
573 |
/// <ul> |
|
574 |
/// <li> |
|
575 |
/// Returns the count of IAB vendors |
|
576 |
/// </li> |
|
577 |
/// </ul> |
|
578 |
- (NSInteger)getIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
579 |
/// Get number of non-IAB vendors |
|
580 |
/// <ul> |
|
581 |
/// <li> |
|
582 |
/// Returns the count of non-IAB vendors |
|
583 |
/// </li> |
|
584 |
/// </ul> |
|
585 |
- (NSInteger)getNonIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
586 |
/// Get JavaScript to embed into a WebView to pass the consent status from the app |
|
587 |
/// to the Didomi Web SDK embedded into the WebView |
|
588 |
/// Inject the returned JavaScript into a WebView |
|
589 |
/// \param extra Extra JavaScript to inject in the returned code |
|
590 |
/// |
|
591 |
/// |
|
592 |
/// returns: |
|
593 |
/// JavaScript code to inject in a WebView |
|
594 |
- (NSString * _Nonnull)getJavaScriptForWebViewWithExtra:(NSString * _Nonnull)extra SWIFT_WARN_UNUSED_RESULT; |
|
595 |
/// 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. |
|
596 |
/// The returned parameter will have the format <code>didomiConfig.user.externalConsent.value=...</code> It includes the user consent information URL-encoded and JSON-encoded. |
|
597 |
/// Append the returned query-string parameter to the URL of your WebView or SFSafariViewController. |
|
598 |
/// See https://developers.didomi.io/cmp/mobile-sdk/share-consent-with-webviews for more information. |
|
599 |
/// |
|
600 |
/// returns: |
|
601 |
/// Query string parameter to append to URL |
|
602 |
- (NSString * _Nonnull)getQueryStringForWebView SWIFT_WARN_UNUSED_RESULT; |
|
603 |
/// Method used to update the selected language of the Didomi SDK and any property that depends on it. |
|
604 |
/// 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. |
|
605 |
/// 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. |
|
606 |
/// \param languageCode string containing the language code e.g.: “es”, “fr”, etc. |
|
607 |
/// |
|
608 |
- (void)updateSelectedLanguageWithLanguageCode:(NSString * _Nonnull)languageCode; |
|
609 |
@end |
|
610 |
|
|
611 |
typedef SWIFT_ENUM(NSInteger, Views, open) { |
|
612 |
ViewsPurposes = 0, |
|
613 |
ViewsSensitivePersonalInformation = 1, |
|
614 |
ViewsVendors = 2, |
|
615 |
}; |
|
616 |
|
|
617 |
@class UIViewController; |
|
618 |
|
|
619 |
/// Protocol used to provide the view controllers for the preferences/purposes and notice view. |
|
620 |
/// To provide customs views, this protocol will have to be implemented. |
|
621 |
/// This protocol is implemented by the Didomi singleton to provide the default view controllers. |
|
622 |
SWIFT_PROTOCOL("_TtP6Didomi20ViewProviderDelegate_") |
|
623 |
@protocol ViewProviderDelegate |
|
624 |
/// Method used to provide a view controller that will be used to display the notice. |
|
625 |
/// \param position string that represents the position of the notice (e.g.: bottom, popup, etc.). |
|
626 |
/// |
|
627 |
/// \param skipped Whether notice display is skipped and Preferences are displayed directly |
|
628 |
/// |
|
629 |
/// |
|
630 |
/// returns: |
|
631 |
/// the view controller associated to the notice. |
|
632 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
633 |
/// Method used to provide a view controller that will be used to display the preferences/purposes view. |
|
634 |
/// |
|
635 |
/// returns: |
|
636 |
/// the view controller associated to the preferences/purposes view. |
|
637 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
638 |
@end |
|
639 |
|
|
640 |
|
|
641 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) <ViewProviderDelegate> |
|
642 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
643 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
644 |
@end |
|
645 |
|
|
646 |
@class UserAuthParams; |
|
647 |
@class DDMUserStatus; |
|
648 |
|
|
649 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) |
|
650 |
/// Provide the objects required to display UI elements |
|
651 |
- (void)setupUIWithContainerController:(UIViewController * _Nonnull)containerController; |
|
652 |
/// Force show the consent notice without checking if consent is required |
|
653 |
/// Important: Do not keep a local reference to the View Controller itself as that could create a memory leak |
|
654 |
- (void)forceShowNotice; |
|
655 |
/// Show the consent notice (if required, not disabled in the config and not already displayed) |
|
656 |
- (void)showNotice; |
|
657 |
/// Hide the notice if it is currently displayed |
|
658 |
- (void)hideNotice; |
|
659 |
/// Check if the consent notice is currently displayed |
|
660 |
/// @return |
|
661 |
- (BOOL)isNoticeVisible SWIFT_WARN_UNUSED_RESULT; |
|
662 |
/// 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 |
|
663 |
/// |
|
664 |
/// returns: |
|
665 |
/// A boolean depending if the consent should be collected or not |
|
666 |
- (BOOL)shouldConsentBeCollected SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use shouldUserStatusBeCollected() instead."); |
|
667 |
/// Determine if the User Status (consent) should be collected or not. User Status should be collected if: |
|
668 |
/// <ul> |
|
669 |
/// <li> |
|
670 |
/// Regulation is different from NONE and |
|
671 |
/// </li> |
|
672 |
/// <li> |
|
673 |
/// User status is partial and |
|
674 |
/// </li> |
|
675 |
/// <li> |
|
676 |
/// The number of days before displaying the notice again has exceeded the limit specified on the Console or no User Status has been saved |
|
677 |
/// </li> |
|
678 |
/// </ul> |
|
679 |
/// |
|
680 |
/// returns: |
|
681 |
/// A boolean depending if the User Status (consent) should be collected or not |
|
682 |
- (BOOL)shouldUserStatusBeCollected SWIFT_WARN_UNUSED_RESULT; |
|
683 |
/// Check if user status is partial |
|
684 |
/// |
|
685 |
/// returns: |
|
686 |
/// <em>true</em> if user status is partial, <em>false</em> otherwise |
|
687 |
- (BOOL)isUserStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
688 |
/// Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed. |
|
689 |
/// \param controller view controller from where preferences will be presented. |
|
690 |
/// |
|
691 |
/// \param view a value from <code>Didomi.Views</code>. It can be <code>.purposes</code> or <code>.sensitivePersonalInformation</code> or <code>.vendors</code> (<code>ViewsPurposes</code> or <code>ViewsSensitivePersonalInformation</code> or <code>ViewsVendors</code> in Objective-C) |
|
692 |
/// |
|
693 |
- (void)showPreferencesWithController:(UIViewController * _Nullable)controller view:(enum Views)view; |
|
694 |
/// Hide the preferences popup for purposes |
|
695 |
- (void)hidePreferences; |
|
696 |
/// Method used to check if the Preferences view is visible. |
|
697 |
/// |
|
698 |
/// returns: |
|
699 |
/// <em>true</em> if Preferences view is visible, <em>false</em> otherwise. |
|
700 |
- (BOOL)isPreferencesVisible SWIFT_WARN_UNUSED_RESULT; |
|
701 |
/// Method used to get a translated text based on the key being passed. |
|
702 |
/// The language and the source of this translated text will depend on the availability of the translation for the specific key. |
|
703 |
/// 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 <code>didomi_config.json</code> file which can be either local or remote, or the <code>didomi_master_config.json</code> file which is bundled within the SDK. |
|
704 |
/// These are the attempts performed by the SDK to try to find a translation for the specific key: |
|
705 |
/// <ul> |
|
706 |
/// <li> |
|
707 |
/// Get translated value in user locale (selected language) from <code>didomi_config.json</code> (either local or remote). |
|
708 |
/// </li> |
|
709 |
/// <li> |
|
710 |
/// Get translated value in default locale (from the config) from <code>didomi_config.json</code> (either local or remote). |
|
711 |
/// </li> |
|
712 |
/// <li> |
|
713 |
/// Get translated value in user locale (selected language) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
714 |
/// </li> |
|
715 |
/// <li> |
|
716 |
/// Get translated value in default locale (from the config) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
717 |
/// </li> |
|
718 |
/// </ul> |
|
719 |
/// If no translation can be found after these 4 attempts, the key will be returned. |
|
720 |
/// App developers can provide these translated texts through the <code>didomi_config.json</code> file (locally or remotely) in 3 different ways: |
|
721 |
/// <ul> |
|
722 |
/// <li> |
|
723 |
/// Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts |
|
724 |
/// </li> |
|
725 |
/// <li> |
|
726 |
/// Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text |
|
727 |
/// </li> |
|
728 |
/// <li> |
|
729 |
/// Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices |
|
730 |
/// </li> |
|
731 |
/// </ul> |
|
732 |
/// \param key used to find its corresponding value in one of the different sources. |
|
733 |
/// |
|
734 |
/// |
|
735 |
/// returns: |
|
736 |
/// a translated string if a translation was found, the same key that was passed otherwise. |
|
737 |
- (NSString * _Nonnull)getTranslatedTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
738 |
/// Method used to get a dictionary/map in the form of { “en”: “Key in English”, “fr”: “Key in French.” } |
|
739 |
/// for a given key. |
|
740 |
/// \param key used to find its corresponding value in the dictionary/map. |
|
741 |
/// |
|
742 |
/// |
|
743 |
/// returns: |
|
744 |
/// dictionary containing the different translations for a given key. |
|
745 |
- (NSDictionary<NSString *, NSString *> * _Nullable)getTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
746 |
/// Set the minimum level of messages to log |
|
747 |
/// Messages with a level below <code>minLevel</code> will not be logged. |
|
748 |
/// Levels are standard levels from <code>OSLogType</code> (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message): |
|
749 |
/// <ul> |
|
750 |
/// <li> |
|
751 |
/// OSLogType.info (1) |
|
752 |
/// </li> |
|
753 |
/// <li> |
|
754 |
/// OSLogType.debug (2) |
|
755 |
/// </li> |
|
756 |
/// <li> |
|
757 |
/// OSLogType.error (16) |
|
758 |
/// </li> |
|
759 |
/// <li> |
|
760 |
/// OSLogType.fault (17) |
|
761 |
/// </li> |
|
762 |
/// </ul> |
|
763 |
/// We recommend setting <code>OSLogType.error</code> (16) in production |
|
764 |
/// \param minLevel Minimum level of messages to log |
|
765 |
/// |
|
766 |
- (void)setLogLevelWithMinLevel:(uint8_t)minLevel; |
|
767 |
/// Set organization user information |
|
768 |
/// \param id Organization user ID |
|
769 |
/// |
|
770 |
- (void)setUserWithId:(NSString * _Nonnull)id; |
|
771 |
/// Set organization user information and display consent notice if it is needed after synchronization |
|
772 |
/// \param id Organization user ID |
|
773 |
/// |
|
774 |
/// \param containerController View controller from which we can setup Didomi UI |
|
775 |
/// |
|
776 |
- (void)setUserWithId:(NSString * _Nonnull)id containerController:(UIViewController * _Nonnull)containerController; |
|
777 |
/// Set organization user information with authentication |
|
778 |
/// \param userAuthParams Organization user authentication params |
|
779 |
/// |
|
780 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams; |
|
781 |
/// Set organization user information with authentication, and display consent notice if it is needed after synchronization |
|
782 |
/// \param userAuthParams Organization user authentication params |
|
783 |
/// |
|
784 |
/// \param containerController View controller from which we can setup Didomi UI |
|
785 |
/// |
|
786 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams containerController:(UIViewController * _Nonnull)containerController; |
|
787 |
/// Remove organization user information (should be called when the SDK is initialized). |
|
788 |
- (void)clearUser; |
|
789 |
/// Get an instance of <code>UserStatus</code> containing all the information related to the user’s choices. |
|
790 |
- (DDMUserStatus * _Nonnull)getUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
791 |
/// Get an instance of <code>CurrentUserStatus</code> containing all the information related to the user’s choices. |
|
792 |
- (DDMCurrentUserStatus * _Nonnull)getCurrentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
793 |
/// Save user’s choices. |
|
794 |
/// \param currentUserStatus instance of CurrentUserStatus containing the user’s choices. |
|
795 |
/// |
|
796 |
/// |
|
797 |
/// returns: |
|
798 |
/// <em>true</em> if user’s choices have been saved, <em>false</em> otherwise. |
|
799 |
- (BOOL)setCurrentUserStatusWithCurrentUserStatus:(DDMCurrentUserStatus * _Nonnull)currentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
800 |
/// Create an instance of the<code>CurrentUserStatusTransaction</code> class. |
|
801 |
/// This class is used to asynchronously enable and disable purposes and vendors through different methods. |
|
802 |
/// These changes will not be reflected on the user status until the <code>commit</code> method of the returned object is called. |
|
803 |
/// |
|
804 |
/// returns: |
|
805 |
/// an instance of the <code>CurrentUserStatusTransaction</code> class |
|
806 |
- (CurrentUserStatusTransaction * _Nonnull)openCurrentUserStatusTransaction SWIFT_WARN_UNUSED_RESULT; |
|
807 |
@end |
|
808 |
|
|
809 |
enum DDMErrorEventType : NSInteger; |
|
810 |
|
|
811 |
/// Type used to represent unexpected situations during SDK initialization. |
|
812 |
SWIFT_CLASS_NAMED("DidomiErrorEvent") |
|
813 |
@interface DDMErrorEvent : NSObject |
|
814 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
815 |
@property (nonatomic, readonly) enum DDMErrorEventType type; |
|
816 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
817 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
818 |
@end |
|
819 |
|
|
820 |
/// Enum used to represent a type for the DidomiErrorEvent class. |
|
821 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMErrorEventType, "DidomiErrorEventType", open) { |
|
822 |
DDMErrorEventTypeNilProperty = 0, |
|
823 |
DDMErrorEventTypeNotReady = 1, |
|
824 |
DDMErrorEventTypeFailedAlready = 2, |
|
825 |
DDMErrorEventTypeConfigFileError = 3, |
|
826 |
DDMErrorEventTypeInvalidApiKey = 4, |
|
827 |
}; |
|
828 |
|
|
829 |
|
|
830 |
/// Initialization parameters for Didomi SDK |
|
831 |
SWIFT_CLASS("_TtC6Didomi26DidomiInitializeParameters") |
|
832 |
@interface DidomiInitializeParameters : NSObject |
|
833 |
- (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; |
|
834 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
835 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
836 |
@end |
|
837 |
|
|
838 |
|
|
839 |
enum DDMEventType : NSInteger; |
|
840 |
|
|
841 |
/// Class used as a listener for internal events occurred in the SDK. |
|
842 |
SWIFT_CLASS_NAMED("EventListener") |
|
843 |
@interface DDMEventListener : NSObject |
|
844 |
/// Closures used to execute code when the different events are triggered. |
|
845 |
/// Internal |
|
846 |
@property (nonatomic, copy) void (^ _Nonnull onConsentChanged)(enum DDMEventType); |
|
847 |
@property (nonatomic, copy) void (^ _Nonnull onReady)(enum DDMEventType); |
|
848 |
@property (nonatomic, copy) void (^ _Nonnull onError)(DDMErrorEvent * _Nonnull); |
|
849 |
/// Notice |
|
850 |
@property (nonatomic, copy) void (^ _Nonnull onHideNotice)(enum DDMEventType); |
|
851 |
@property (nonatomic, copy) void (^ _Nonnull onShowNotice)(enum DDMEventType); |
|
852 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickAgree)(enum DDMEventType); |
|
853 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickDisagree)(enum DDMEventType); |
|
854 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickMoreInfo)(enum DDMEventType); |
|
855 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewVendors)(enum DDMEventType); |
|
856 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewSPIPurposes)(enum DDMEventType); |
|
857 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickPrivacyPolicy)(enum DDMEventType); |
|
858 |
/// Preferences |
|
859 |
@property (nonatomic, copy) void (^ _Nonnull onHidePreferences)(enum DDMEventType); |
|
860 |
@property (nonatomic, copy) void (^ _Nonnull onShowPreferences)(enum DDMEventType); |
|
861 |
/// Preferences - Views |
|
862 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewPurposes)(enum DDMEventType); |
|
863 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewVendors)(enum DDMEventType); |
|
864 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewSPIPurposes)(enum DDMEventType); |
|
865 |
/// Preferences - Purpose |
|
866 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAll)(enum DDMEventType); |
|
867 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAll)(enum DDMEventType); |
|
868 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllPurposes)(enum DDMEventType); |
|
869 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllPurposes)(enum DDMEventType); |
|
870 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickResetAllPurposes)(enum DDMEventType); |
|
871 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
872 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
873 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
874 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
875 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSaveChoices)(enum DDMEventType); |
|
876 |
/// Preferences - Vendor |
|
877 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllVendors)(enum DDMEventType); |
|
878 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllVendors)(enum DDMEventType); |
|
879 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorAgree)(enum DDMEventType, NSString * _Nullable); |
|
880 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorDisagree)(enum DDMEventType, NSString * _Nullable); |
|
881 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorSaveChoices)(enum DDMEventType); |
|
882 |
/// Preferences - Sensitive Personal Information |
|
883 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
884 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
885 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
886 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
887 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeSaveChoices)(enum DDMEventType); |
|
888 |
/// Sync |
|
889 |
@property (nonatomic, copy) void (^ _Nonnull onSyncDone)(enum DDMEventType, NSString * _Nullable); |
|
890 |
@property (nonatomic, copy) void (^ _Nonnull onSyncError)(enum DDMEventType, NSString * _Nullable); |
|
891 |
/// Language |
|
892 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdated)(enum DDMEventType, NSString * _Nullable); |
|
893 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdateFailed)(enum DDMEventType, NSString * _Nullable); |
|
894 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
895 |
@end |
|
896 |
|
|
897 |
/// Enum used to define the different type of internal events that can be triggered from the SDK. |
|
898 |
/// Please keep the current order because of Unity bridge. |
|
899 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMEventType, "EventType", open) { |
|
900 |
DDMEventTypeConsentChanged = 0, |
|
901 |
DDMEventTypeHideNotice = 1, |
|
902 |
DDMEventTypeReady = 2, |
|
903 |
DDMEventTypeShowNotice = 3, |
|
904 |
DDMEventTypeShowPreferences = 4, |
|
905 |
DDMEventTypeHidePreferences = 5, |
|
906 |
DDMEventTypeNoticeClickAgree = 6, |
|
907 |
DDMEventTypeNoticeClickDisagree = 7, |
|
908 |
DDMEventTypeNoticeClickMoreInfo = 8, |
|
909 |
DDMEventTypeNoticeClickViewVendors = 9, |
|
910 |
DDMEventTypeNoticeClickPrivacyPolicy = 10, |
|
911 |
DDMEventTypePreferencesClickAgreeToAll = 11, |
|
912 |
DDMEventTypePreferencesClickDisagreeToAll = 12, |
|
913 |
DDMEventTypePreferencesClickAgreeToAllPurposes = 13, |
|
914 |
DDMEventTypePreferencesClickDisagreeToAllPurposes = 14, |
|
915 |
DDMEventTypePreferencesClickResetAllPurposes = 15, |
|
916 |
DDMEventTypePreferencesClickAgreeToAllVendors = 16, |
|
917 |
DDMEventTypePreferencesClickDisagreeToAllVendors = 17, |
|
918 |
DDMEventTypePreferencesClickPurposeAgree = 18, |
|
919 |
DDMEventTypePreferencesClickPurposeDisagree = 19, |
|
920 |
DDMEventTypePreferencesClickCategoryAgree = 20, |
|
921 |
DDMEventTypePreferencesClickCategoryDisagree = 21, |
|
922 |
DDMEventTypePreferencesClickViewVendors = 22, |
|
923 |
DDMEventTypePreferencesClickViewPurposes = 23, |
|
924 |
DDMEventTypePreferencesClickSaveChoices = 24, |
|
925 |
DDMEventTypePreferencesClickVendorAgree = 25, |
|
926 |
DDMEventTypePreferencesClickVendorDisagree = 26, |
|
927 |
DDMEventTypePreferencesClickVendorSaveChoices = 27, |
|
928 |
/// Sync |
|
929 |
DDMEventTypeSyncDone = 28, |
|
930 |
DDMEventTypeSyncError = 29, |
|
931 |
/// Language |
|
932 |
DDMEventTypeLanguageUpdated = 30, |
|
933 |
DDMEventTypeLanguageUpdateFailed = 31, |
|
934 |
/// Preferences - Sensitive Personal Information |
|
935 |
DDMEventTypeNoticeClickViewSPIPurposes = 32, |
|
936 |
DDMEventTypePreferencesClickViewSPIPurposes = 33, |
|
937 |
DDMEventTypePreferencesClickSPIPurposeAgree = 34, |
|
938 |
DDMEventTypePreferencesClickSPIPurposeDisagree = 35, |
|
939 |
DDMEventTypePreferencesClickSPICategoryAgree = 36, |
|
940 |
DDMEventTypePreferencesClickSPICategoryDisagree = 37, |
|
941 |
DDMEventTypePreferencesClickSPIPurposeSaveChoices = 38, |
|
942 |
}; |
|
943 |
|
|
944 |
|
|
945 |
|
|
946 |
|
|
947 |
|
|
948 |
|
|
949 |
|
|
950 |
|
|
951 |
|
|
952 |
/// Public class representing a single Purpose configuration. |
|
953 |
SWIFT_CLASS_NAMED("Purpose") |
|
954 |
@interface DDMPurpose : NSObject |
|
955 |
/// Purpose id used by Didomi SDK. |
|
956 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
957 |
/// Purpose human-readable name, translated in selected language. |
|
958 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
959 |
/// Purpose description, translated in selected language. |
|
960 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
961 |
/// Initializer method for the Purpose class. |
|
962 |
/// \param id Purpose id used by Didomi SDK. |
|
963 |
/// |
|
964 |
/// \param name Purpose human-readable name, translated in selected language. |
|
965 |
/// |
|
966 |
/// \param descriptionText Purpose description, translated in selected language. |
|
967 |
/// |
|
968 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name descriptionText:(NSString * _Nonnull)descriptionText OBJC_DESIGNATED_INITIALIZER; |
|
969 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
970 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
971 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
972 |
@end |
|
973 |
|
|
974 |
|
|
975 |
/// Regulation for which Didomi SDK is currently configured. Only one regulation is active at each run. |
|
976 |
typedef SWIFT_ENUM(NSInteger, Regulation, open) { |
|
977 |
RegulationGdpr = 0, |
|
978 |
RegulationCcpa = 1, |
|
979 |
RegulationCpa = 2, |
|
980 |
RegulationCpra = 3, |
|
981 |
RegulationCtdpa = 4, |
|
982 |
RegulationUcpa = 5, |
|
983 |
RegulationVcdpa = 6, |
|
984 |
RegulationNone = 7, |
|
985 |
}; |
|
986 |
|
|
987 |
|
|
988 |
|
|
989 |
|
|
990 |
|
|
991 |
|
|
992 |
|
|
993 |
|
|
994 |
|
|
995 |
|
|
996 |
|
|
997 |
|
|
998 |
|
|
999 |
|
|
1000 |
|
|
1001 |
|
|
1002 |
|
|
1003 |
|
|
1004 |
|
|
1005 |
|
|
1006 |
|
|
1007 |
|
|
1008 |
/// Protocol for User Authentication |
|
1009 |
/// declare the user id |
|
1010 |
SWIFT_PROTOCOL("_TtP6Didomi8UserAuth_") |
|
1011 |
@protocol UserAuth |
|
1012 |
/// Organization ID to associate with the user |
|
1013 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1014 |
@end |
|
1015 |
|
|
1016 |
|
|
1017 |
/// Protocol for User Authentication Parameters |
|
1018 |
/// declare the common properties of encryption / hash parameters |
|
1019 |
SWIFT_CLASS("_TtC6Didomi14UserAuthParams") |
|
1020 |
@interface UserAuthParams : NSObject <UserAuth> |
|
1021 |
/// Organization ID to associate with the user |
|
1022 |
@property (nonatomic, copy) NSString * _Nonnull id; |
|
1023 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1024 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1025 |
@end |
|
1026 |
|
|
1027 |
|
|
1028 |
/// User Authentication Parameters with encryption |
|
1029 |
SWIFT_CLASS("_TtC6Didomi28UserAuthWithEncryptionParams") |
|
1030 |
@interface UserAuthWithEncryptionParams : UserAuthParams |
|
1031 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector; |
|
1032 |
/// Initializer for Objective-C |
|
1033 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector legacyExpiration:(NSTimeInterval)legacyExpiration; |
|
1034 |
/// Initialization Vector used for computing the user ID |
|
1035 |
@property (nonatomic, copy) NSString * _Nonnull initializationVector; |
|
1036 |
@end |
|
1037 |
|
|
1038 |
|
|
1039 |
/// User Authentication Parameters with hash |
|
1040 |
SWIFT_CLASS("_TtC6Didomi22UserAuthWithHashParams") |
|
1041 |
@interface UserAuthWithHashParams : UserAuthParams |
|
1042 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt; |
|
1043 |
/// Initializer for Objective-C |
|
1044 |
- (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; |
|
1045 |
/// Salt used for computing the user ID (optional) |
|
1046 |
@property (nonatomic, copy) NSString * _Nullable salt; |
|
1047 |
/// Digest used for representing the user ID |
|
1048 |
@property (nonatomic, copy) NSString * _Nonnull digest; |
|
1049 |
@end |
|
1050 |
|
|
1051 |
@class DDMUserStatusPurposes; |
|
1052 |
@class DDMUserStatusVendors; |
|
1053 |
|
|
1054 |
SWIFT_CLASS_NAMED("UserStatus") |
|
1055 |
@interface DDMUserStatus : NSObject |
|
1056 |
@property (nonatomic, readonly, strong) DDMUserStatusPurposes * _Nonnull purposes; |
|
1057 |
@property (nonatomic, readonly, strong) DDMUserStatusVendors * _Nonnull vendors; |
|
1058 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
1059 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
1060 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
1061 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
1062 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
1063 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
1064 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
1065 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1066 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1067 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1068 |
@end |
|
1069 |
|
|
1070 |
|
|
1071 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1072 |
@end |
|
1073 |
|
|
1074 |
@class DDMUserStatusIDs; |
|
1075 |
|
|
1076 |
SWIFT_CLASS_NAMED("Vendors") |
|
1077 |
@interface DDMUserStatusVendors : NSObject |
|
1078 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
1079 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
1080 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
1081 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalConsent; |
|
1082 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalLegitimateInterest; |
|
1083 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1084 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1085 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1086 |
@end |
|
1087 |
|
|
1088 |
|
|
1089 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1090 |
@end |
|
1091 |
|
|
1092 |
|
|
1093 |
SWIFT_CLASS_NAMED("IDs") |
|
1094 |
@interface DDMUserStatusIDs : NSObject |
|
1095 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull enabled; |
|
1096 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull disabled; |
|
1097 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1098 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1099 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1100 |
@end |
|
1101 |
|
|
1102 |
|
|
1103 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1104 |
@end |
|
1105 |
|
|
1106 |
|
|
1107 |
SWIFT_CLASS_NAMED("Purposes") |
|
1108 |
@interface DDMUserStatusPurposes : NSObject |
|
1109 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
1110 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
1111 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
1112 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull essential; |
|
1113 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1114 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1115 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1116 |
@end |
|
1117 |
|
|
1118 |
@class DDMVendorNamespaces; |
|
1119 |
@class DDMVendorURL; |
|
1120 |
|
|
1121 |
/// Public class representing a single Vendor configuration. |
|
1122 |
SWIFT_CLASS_NAMED("Vendor") |
|
1123 |
@interface DDMVendor : NSObject |
|
1124 |
/// Unique ID of the vendor provided by Didomi. This ID does not include prefixes. Example: “vendor-1”. |
|
1125 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1126 |
/// Name of the vendor. |
|
1127 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
1128 |
/// Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
1129 |
@property (nonatomic, readonly, strong) DDMVendorNamespaces * _Nullable namespaces; |
|
1130 |
/// URL to the privacy policy of the vendor. |
|
1131 |
@property (nonatomic, readonly, copy) NSString * _Nullable policyUrl; |
|
1132 |
/// Purpose IDs that the vendor is operating under the consent legal basis. |
|
1133 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull purposeIDs; |
|
1134 |
/// Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
1135 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull legIntPurposeIDs; |
|
1136 |
/// Set with IDs that represent features. |
|
1137 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull featureIDs; |
|
1138 |
/// Set with IDs that represent flexible purposes. Introduced in IAB TCF v2. |
|
1139 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull flexiblePurposeIDs; |
|
1140 |
/// Set with IDs that represent Special Purposes. Introduced in IAB TCF v2. |
|
1141 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialPurposeIDs; |
|
1142 |
/// Set with IDs that represent Special Features. Introduced in IAB TCF v2. |
|
1143 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialFeatureIDs; |
|
1144 |
/// Privacy policy and LI disclaimer urls. Introduced in IAB TCF v2.2. |
|
1145 |
@property (nonatomic, readonly, copy) NSArray<DDMVendorURL *> * _Nullable urls; |
|
1146 |
/// Initializer method for the Purpose class. |
|
1147 |
/// \param id Unique ID of the vendor. |
|
1148 |
/// |
|
1149 |
/// \param name Name of the vendor. |
|
1150 |
/// |
|
1151 |
/// \param policyUrl URL to the privacy policy of the vendor. |
|
1152 |
/// |
|
1153 |
/// \param namespaces Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
1154 |
/// |
|
1155 |
/// \param purposeIDs Purpose IDs that the vendor is operating under the consent legal basis. |
|
1156 |
/// |
|
1157 |
/// \param legIntPurposeIDs Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
1158 |
/// |
|
1159 |
/// \param featureIDs Set with IDs that represent features. |
|
1160 |
/// |
|
1161 |
/// \param flexiblePurposeIDs Set with IDs that represent flexible purposes. |
|
1162 |
/// |
|
1163 |
/// \param specialPurposeIDs Set with IDs that represent Special Purposes. |
|
1164 |
/// |
|
1165 |
/// \param specialFeatureIDs Set with IDs that represent Special Features. |
|
1166 |
/// |
|
1167 |
/// \param urls Privacy policy and LI disclaimer urls. |
|
1168 |
/// |
|
1169 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name policyUrl:(NSString * _Nullable)policyUrl namespaces:(DDMVendorNamespaces * _Nullable)namespaces purposeIDs:(NSSet<NSString *> * _Nonnull)purposeIDs legIntPurposeIDs:(NSSet<NSString *> * _Nonnull)legIntPurposeIDs featureIDs:(NSSet<NSString *> * _Nonnull)featureIDs flexiblePurposeIDs:(NSSet<NSString *> * _Nonnull)flexiblePurposeIDs specialPurposeIDs:(NSSet<NSString *> * _Nonnull)specialPurposeIDs specialFeatureIDs:(NSSet<NSString *> * _Nonnull)specialFeatureIDs urls:(NSArray<DDMVendorURL *> * _Nullable)urls OBJC_DESIGNATED_INITIALIZER; |
|
1170 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1171 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1172 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1173 |
@end |
|
1174 |
|
|
1175 |
|
|
1176 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
1177 |
@end |
|
1178 |
|
|
1179 |
|
|
1180 |
/// Store additional IDs (IAB, num) for the Vendor. |
|
1181 |
SWIFT_CLASS_NAMED("Namespaces") |
|
1182 |
@interface DDMVendorNamespaces : NSObject |
|
1183 |
@property (nonatomic, readonly, copy) NSString * _Nullable iab2; |
|
1184 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1185 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1186 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1187 |
@end |
|
1188 |
|
|
1189 |
|
|
1190 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
1191 |
@end |
|
1192 |
|
|
1193 |
|
|
1194 |
/// Store localized URLs for privacy policy and LI claim. |
|
1195 |
SWIFT_CLASS_NAMED("URL") |
|
1196 |
@interface DDMVendorURL : NSObject |
|
1197 |
@property (nonatomic, readonly, copy) NSString * _Nullable langID; |
|
1198 |
@property (nonatomic, readonly, copy) NSString * _Nullable privacy; |
|
1199 |
@property (nonatomic, readonly, copy) NSString * _Nullable legIntClaim; |
|
1200 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1201 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1202 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1203 |
@end |
|
1204 |
|
|
1205 |
|
|
1206 |
|
|
1207 |
#endif |
|
1208 |
#if defined(__cplusplus) |
|
1209 |
#endif |
|
1210 |
#if __has_attribute(external_source_symbol) |
|
1211 |
# pragma clang attribute pop |
|
1212 |
#endif |
|
1213 |
#pragma clang diagnostic pop |
|
1214 |
#endif |
|
1215 |
|
|
1216 |
#elif defined(__x86_64__) && __x86_64__ |
|
1217 |
// Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) |
|
1218 |
#ifndef DIDOMI_SWIFT_H |
|
1219 |
#define DIDOMI_SWIFT_H |
|
1220 |
#pragma clang diagnostic push |
|
1221 |
#pragma clang diagnostic ignored "-Wgcc-compat" |
|
1222 |
|
|
1223 |
#if !defined(__has_include) |
|
1224 |
# define __has_include(x) 0 |
|
1225 |
#endif |
|
1226 |
#if !defined(__has_attribute) |
|
1227 |
# define __has_attribute(x) 0 |
|
1228 |
#endif |
|
1229 |
#if !defined(__has_feature) |
|
1230 |
# define __has_feature(x) 0 |
|
1231 |
#endif |
|
1232 |
#if !defined(__has_warning) |
|
1233 |
# define __has_warning(x) 0 |
|
1234 |
#endif |
|
1235 |
|
|
1236 |
#if __has_include(<swift/objc-prologue.h>) |
|
1237 |
# include <swift/objc-prologue.h> |
|
1238 |
#endif |
|
1239 |
|
|
1240 |
#pragma clang diagnostic ignored "-Wauto-import" |
|
1241 |
#if defined(__OBJC__) |
|
1242 |
#include <Foundation/Foundation.h> |
|
1243 |
#endif |
|
1244 |
#if defined(__cplusplus) |
|
1245 |
#include <cstdint> |
|
1246 |
#include <cstddef> |
|
1247 |
#include <cstdbool> |
|
1248 |
#include <cstring> |
|
1249 |
#include <stdlib.h> |
|
1250 |
#include <new> |
|
1251 |
#include <type_traits> |
|
1252 |
#else |
|
1253 |
#include <stdint.h> |
|
1254 |
#include <stddef.h> |
|
1255 |
#include <stdbool.h> |
|
1256 |
#include <string.h> |
|
1257 |
#endif |
|
1258 |
#if defined(__cplusplus) |
|
1259 |
#if __has_include(<ptrauth.h>) |
|
1260 |
# include <ptrauth.h> |
|
1261 |
#else |
|
1262 |
# ifndef __ptrauth_swift_value_witness_function_pointer |
|
1263 |
# define __ptrauth_swift_value_witness_function_pointer(x) |
|
1264 |
# endif |
|
1265 |
#endif |
|
1266 |
#endif |
|
1267 |
|
|
1268 |
#if !defined(SWIFT_TYPEDEFS) |
|
1269 |
# define SWIFT_TYPEDEFS 1 |
|
1270 |
# if __has_include(<uchar.h>) |
|
1271 |
# include <uchar.h> |
|
1272 |
# elif !defined(__cplusplus) |
|
1273 |
typedef uint_least16_t char16_t; |
|
1274 |
typedef uint_least32_t char32_t; |
|
1275 |
# endif |
|
1276 |
typedef float swift_float2 __attribute__((__ext_vector_type__(2))); |
|
1277 |
typedef float swift_float3 __attribute__((__ext_vector_type__(3))); |
|
1278 |
typedef float swift_float4 __attribute__((__ext_vector_type__(4))); |
|
1279 |
typedef double swift_double2 __attribute__((__ext_vector_type__(2))); |
|
1280 |
typedef double swift_double3 __attribute__((__ext_vector_type__(3))); |
|
1281 |
typedef double swift_double4 __attribute__((__ext_vector_type__(4))); |
|
1282 |
typedef int swift_int2 __attribute__((__ext_vector_type__(2))); |
|
1283 |
typedef int swift_int3 __attribute__((__ext_vector_type__(3))); |
|
1284 |
typedef int swift_int4 __attribute__((__ext_vector_type__(4))); |
|
1285 |
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); |
|
1286 |
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); |
|
1287 |
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); |
|
1288 |
#endif |
|
1289 |
|
|
1290 |
#if !defined(SWIFT_PASTE) |
|
1291 |
# define SWIFT_PASTE_HELPER(x, y) x##y |
|
1292 |
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) |
|
1293 |
#endif |
|
1294 |
#if !defined(SWIFT_METATYPE) |
|
1295 |
# define SWIFT_METATYPE(X) Class |
|
1296 |
#endif |
|
1297 |
#if !defined(SWIFT_CLASS_PROPERTY) |
|
1298 |
# if __has_feature(objc_class_property) |
|
1299 |
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ |
|
1300 |
# else |
|
1301 |
# define SWIFT_CLASS_PROPERTY(...) |
|
1302 |
# endif |
|
1303 |
#endif |
|
1304 |
#if !defined(SWIFT_RUNTIME_NAME) |
|
1305 |
# if __has_attribute(objc_runtime_name) |
|
1306 |
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) |
|
1307 |
# else |
|
1308 |
# define SWIFT_RUNTIME_NAME(X) |
|
1309 |
# endif |
|
1310 |
#endif |
|
1311 |
#if !defined(SWIFT_COMPILE_NAME) |
|
1312 |
# if __has_attribute(swift_name) |
|
1313 |
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) |
|
1314 |
# else |
|
1315 |
# define SWIFT_COMPILE_NAME(X) |
|
1316 |
# endif |
|
1317 |
#endif |
|
1318 |
#if !defined(SWIFT_METHOD_FAMILY) |
|
1319 |
# if __has_attribute(objc_method_family) |
|
1320 |
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) |
|
1321 |
# else |
|
1322 |
# define SWIFT_METHOD_FAMILY(X) |
|
1323 |
# endif |
|
1324 |
#endif |
|
1325 |
#if !defined(SWIFT_NOESCAPE) |
|
1326 |
# if __has_attribute(noescape) |
|
1327 |
# define SWIFT_NOESCAPE __attribute__((noescape)) |
|
1328 |
# else |
|
1329 |
# define SWIFT_NOESCAPE |
|
1330 |
# endif |
|
1331 |
#endif |
|
1332 |
#if !defined(SWIFT_RELEASES_ARGUMENT) |
|
1333 |
# if __has_attribute(ns_consumed) |
|
1334 |
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) |
|
1335 |
# else |
|
1336 |
# define SWIFT_RELEASES_ARGUMENT |
|
1337 |
# endif |
|
1338 |
#endif |
|
1339 |
#if !defined(SWIFT_WARN_UNUSED_RESULT) |
|
1340 |
# if __has_attribute(warn_unused_result) |
|
1341 |
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) |
|
1342 |
# else |
|
1343 |
# define SWIFT_WARN_UNUSED_RESULT |
|
1344 |
# endif |
|
1345 |
#endif |
|
1346 |
#if !defined(SWIFT_NORETURN) |
|
1347 |
# if __has_attribute(noreturn) |
|
1348 |
# define SWIFT_NORETURN __attribute__((noreturn)) |
|
1349 |
# else |
|
1350 |
# define SWIFT_NORETURN |
|
1351 |
# endif |
|
1352 |
#endif |
|
1353 |
#if !defined(SWIFT_CLASS_EXTRA) |
|
1354 |
# define SWIFT_CLASS_EXTRA |
|
1355 |
#endif |
|
1356 |
#if !defined(SWIFT_PROTOCOL_EXTRA) |
|
1357 |
# define SWIFT_PROTOCOL_EXTRA |
|
1358 |
#endif |
|
1359 |
#if !defined(SWIFT_ENUM_EXTRA) |
|
1360 |
# define SWIFT_ENUM_EXTRA |
|
1361 |
#endif |
|
1362 |
#if !defined(SWIFT_CLASS) |
|
1363 |
# if __has_attribute(objc_subclassing_restricted) |
|
1364 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA |
|
1365 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1366 |
# else |
|
1367 |
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1368 |
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA |
|
1369 |
# endif |
|
1370 |
#endif |
|
1371 |
#if !defined(SWIFT_RESILIENT_CLASS) |
|
1372 |
# if __has_attribute(objc_class_stub) |
|
1373 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) |
|
1374 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1375 |
# else |
|
1376 |
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) |
|
1377 |
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) |
|
1378 |
# endif |
|
1379 |
#endif |
|
1380 |
#if !defined(SWIFT_PROTOCOL) |
|
1381 |
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1382 |
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA |
|
1383 |
#endif |
|
1384 |
#if !defined(SWIFT_EXTENSION) |
|
1385 |
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) |
|
1386 |
#endif |
|
1387 |
#if !defined(OBJC_DESIGNATED_INITIALIZER) |
|
1388 |
# if __has_attribute(objc_designated_initializer) |
|
1389 |
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) |
|
1390 |
# else |
|
1391 |
# define OBJC_DESIGNATED_INITIALIZER |
|
1392 |
# endif |
|
1393 |
#endif |
|
1394 |
#if !defined(SWIFT_ENUM_ATTR) |
|
1395 |
# if __has_attribute(enum_extensibility) |
|
1396 |
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) |
|
1397 |
# else |
|
1398 |
# define SWIFT_ENUM_ATTR(_extensibility) |
|
1399 |
# endif |
|
1400 |
#endif |
|
1401 |
#if !defined(SWIFT_ENUM) |
|
1402 |
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type |
|
1403 |
# if __has_feature(generalized_swift_name) |
|
1404 |
# 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 |
|
1405 |
# else |
|
1406 |
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) |
|
1407 |
# endif |
|
1408 |
#endif |
|
1409 |
#if !defined(SWIFT_UNAVAILABLE) |
|
1410 |
# define SWIFT_UNAVAILABLE __attribute__((unavailable)) |
|
1411 |
#endif |
|
1412 |
#if !defined(SWIFT_UNAVAILABLE_MSG) |
|
1413 |
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) |
|
1414 |
#endif |
|
1415 |
#if !defined(SWIFT_AVAILABILITY) |
|
1416 |
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) |
|
1417 |
#endif |
|
1418 |
#if !defined(SWIFT_WEAK_IMPORT) |
|
1419 |
# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) |
|
1420 |
#endif |
|
1421 |
#if !defined(SWIFT_DEPRECATED) |
|
1422 |
# define SWIFT_DEPRECATED __attribute__((deprecated)) |
|
1423 |
#endif |
|
1424 |
#if !defined(SWIFT_DEPRECATED_MSG) |
|
1425 |
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) |
|
1426 |
#endif |
|
1427 |
#if !defined(SWIFT_DEPRECATED_OBJC) |
|
1428 |
# if __has_feature(attribute_diagnose_if_objc) |
|
1429 |
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) |
|
1430 |
# else |
|
1431 |
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) |
|
1432 |
# endif |
|
1433 |
#endif |
|
1434 |
#if defined(__OBJC__) |
|
1435 |
#if !defined(IBSegueAction) |
|
1436 |
# define IBSegueAction |
|
1437 |
#endif |
|
1438 |
#endif |
|
1439 |
#if !defined(SWIFT_EXTERN) |
|
1440 |
# if defined(__cplusplus) |
|
1441 |
# define SWIFT_EXTERN extern "C" |
|
1442 |
# else |
|
1443 |
# define SWIFT_EXTERN extern |
|
1444 |
# endif |
|
1445 |
#endif |
|
1446 |
#if !defined(SWIFT_CALL) |
|
1447 |
# define SWIFT_CALL __attribute__((swiftcall)) |
|
1448 |
#endif |
|
1449 |
#if !defined(SWIFT_INDIRECT_RESULT) |
|
1450 |
# define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result)) |
|
1451 |
#endif |
|
1452 |
#if !defined(SWIFT_CONTEXT) |
|
1453 |
# define SWIFT_CONTEXT __attribute__((swift_context)) |
|
1454 |
#endif |
|
1455 |
#if !defined(SWIFT_ERROR_RESULT) |
|
1456 |
# define SWIFT_ERROR_RESULT __attribute__((swift_error_result)) |
|
1457 |
#endif |
|
1458 |
#if defined(__cplusplus) |
|
1459 |
# define SWIFT_NOEXCEPT noexcept |
|
1460 |
#else |
|
1461 |
# define SWIFT_NOEXCEPT |
|
1462 |
#endif |
|
1463 |
#if defined(_WIN32) |
|
1464 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1465 |
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport) |
|
1466 |
#endif |
|
1467 |
#else |
|
1468 |
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL) |
|
1469 |
# define SWIFT_IMPORT_STDLIB_SYMBOL |
|
1470 |
#endif |
|
1471 |
#endif |
|
1472 |
#if defined(__OBJC__) |
|
1473 |
#if __has_feature(objc_modules) |
|
1474 |
#if __has_warning("-Watimport-in-framework-header") |
|
1475 |
#pragma clang diagnostic ignored "-Watimport-in-framework-header" |
|
1476 |
#endif |
|
1477 |
@import Foundation; |
|
1478 |
@import ObjectiveC; |
|
1479 |
#endif |
|
1480 |
|
|
1481 |
#endif |
|
1482 |
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" |
|
1483 |
#pragma clang diagnostic ignored "-Wduplicate-method-arg" |
|
1484 |
#if __has_warning("-Wpragma-clang-attribute") |
|
1485 |
# pragma clang diagnostic ignored "-Wpragma-clang-attribute" |
|
1486 |
#endif |
|
1487 |
#pragma clang diagnostic ignored "-Wunknown-pragmas" |
|
1488 |
#pragma clang diagnostic ignored "-Wnullability" |
|
1489 |
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
|
1490 |
|
|
1491 |
#if __has_attribute(external_source_symbol) |
|
1492 |
# pragma push_macro("any") |
|
1493 |
# undef any |
|
1494 |
# 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)) |
|
1495 |
# pragma pop_macro("any") |
|
1496 |
#endif |
|
1497 |
|
|
1498 |
#if defined(__OBJC__) |
|
1499 |
|
|
1500 |
/// Consent status to a vendor or purpose. |
|
1501 |
typedef SWIFT_ENUM(NSInteger, ConsentStatus, open) { |
|
1502 |
ConsentStatusEnable = 0, |
|
1503 |
ConsentStatusDisable = 1, |
|
1504 |
ConsentStatusUnknown = 2, |
|
1505 |
}; |
|
1506 |
|
|
1507 |
@class NSString; |
|
1508 |
@class DDMCurrentUserStatusPurpose; |
|
1509 |
@class DDMCurrentUserStatusVendor; |
|
1510 |
enum Regulation : NSInteger; |
|
1511 |
|
|
1512 |
SWIFT_CLASS_NAMED("CurrentUserStatus") |
|
1513 |
@interface DDMCurrentUserStatus : NSObject |
|
1514 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull purposes; |
|
1515 |
@property (nonatomic, readonly, copy) NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull vendors; |
|
1516 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
1517 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
1518 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
1519 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
1520 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
1521 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
1522 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
1523 |
- (nonnull instancetype)initWithPurposes:(NSDictionary<NSString *, DDMCurrentUserStatusPurpose *> * _Nonnull)purposes vendors:(NSDictionary<NSString *, DDMCurrentUserStatusVendor *> * _Nonnull)vendors OBJC_DESIGNATED_INITIALIZER; |
|
1524 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1525 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1526 |
@end |
|
1527 |
|
|
1528 |
|
|
1529 |
@interface DDMCurrentUserStatus (SWIFT_EXTENSION(Didomi)) |
|
1530 |
@end |
|
1531 |
|
|
1532 |
|
|
1533 |
SWIFT_CLASS_NAMED("PurposeStatus") |
|
1534 |
@interface DDMCurrentUserStatusPurpose : NSObject |
|
1535 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1536 |
@property (nonatomic) BOOL enabled; |
|
1537 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
1538 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1539 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1540 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1541 |
@end |
|
1542 |
|
|
1543 |
|
|
1544 |
SWIFT_CLASS_NAMED("VendorStatus") |
|
1545 |
@interface DDMCurrentUserStatusVendor : NSObject |
|
1546 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
1547 |
@property (nonatomic) BOOL enabled; |
|
1548 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id enabled:(BOOL)enabled OBJC_DESIGNATED_INITIALIZER; |
|
1549 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
1550 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1551 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1552 |
@end |
|
1553 |
|
|
1554 |
|
|
1555 |
/// Class used to asynchronously enable and disable purposes and vendors through different methods. |
|
1556 |
/// These changes will not be reflected on the user status until the <code>commit</code> method is called. |
|
1557 |
SWIFT_CLASS("_TtC6Didomi28CurrentUserStatusTransaction") |
|
1558 |
@interface CurrentUserStatusTransaction : NSObject |
|
1559 |
/// Enable purposes based on an array of IDs. |
|
1560 |
/// \param ids array of purpose IDs. |
|
1561 |
/// |
|
1562 |
/// |
|
1563 |
/// returns: |
|
1564 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1565 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
1566 |
/// Enable vendors based on an array of IDs. |
|
1567 |
/// \param ids array of vendor IDs. |
|
1568 |
/// |
|
1569 |
/// |
|
1570 |
/// returns: |
|
1571 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1572 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
1573 |
/// Enable a single purpose based on its ID. |
|
1574 |
/// \param id purpose ID. |
|
1575 |
/// |
|
1576 |
/// |
|
1577 |
/// returns: |
|
1578 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1579 |
- (CurrentUserStatusTransaction * _Nonnull)enablePurpose:(NSString * _Nonnull)id; |
|
1580 |
/// Enable a single vendor based on its ID. |
|
1581 |
/// \param id vendor ID. |
|
1582 |
/// |
|
1583 |
/// |
|
1584 |
/// returns: |
|
1585 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1586 |
- (CurrentUserStatusTransaction * _Nonnull)enableVendor:(NSString * _Nonnull)id; |
|
1587 |
/// Disable purposes based on an array of IDs. |
|
1588 |
/// \param ids array of purpose IDs. |
|
1589 |
/// |
|
1590 |
/// |
|
1591 |
/// returns: |
|
1592 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1593 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurposes:(NSArray<NSString *> * _Nonnull)ids; |
|
1594 |
/// Disable vendors based on an array of IDs. |
|
1595 |
/// \param ids array of vendor IDs. |
|
1596 |
/// |
|
1597 |
/// |
|
1598 |
/// returns: |
|
1599 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1600 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendors:(NSArray<NSString *> * _Nonnull)ids; |
|
1601 |
/// Disable a single purpose based on its ID. |
|
1602 |
/// \param id purpose ID. |
|
1603 |
/// |
|
1604 |
/// |
|
1605 |
/// returns: |
|
1606 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1607 |
- (CurrentUserStatusTransaction * _Nonnull)disablePurpose:(NSString * _Nonnull)id; |
|
1608 |
/// Disable a single vendor based on its ID. |
|
1609 |
/// \param id vendor ID. |
|
1610 |
/// |
|
1611 |
/// |
|
1612 |
/// returns: |
|
1613 |
/// current instance of <code>CurrentUserStatusTransaction</code>. |
|
1614 |
- (CurrentUserStatusTransaction * _Nonnull)disableVendor:(NSString * _Nonnull)id; |
|
1615 |
/// Commit the user status changes made through the “enable” and “disable” methods. |
|
1616 |
/// |
|
1617 |
/// returns: |
|
1618 |
/// <em>true</em> if user’s choices have been updated, <em>false</em> otherwise. |
|
1619 |
- (BOOL)commit SWIFT_WARN_UNUSED_RESULT; |
|
1620 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
1621 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
1622 |
@end |
|
1623 |
|
|
1624 |
|
|
1625 |
@protocol ViewProviderDelegate; |
|
1626 |
@class DidomiInitializeParameters; |
|
1627 |
@class DDMErrorEvent; |
|
1628 |
@class DDMEventListener; |
|
1629 |
@class DDMPurpose; |
|
1630 |
@class DDMVendor; |
|
1631 |
|
|
1632 |
SWIFT_CLASS("_TtC6Didomi6Didomi") |
|
1633 |
@interface Didomi : NSObject |
|
1634 |
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) Didomi * _Nonnull shared;) |
|
1635 |
+ (Didomi * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT; |
|
1636 |
+ (void)setShared:(Didomi * _Nonnull)value; |
|
1637 |
@property (nonatomic, weak) id <ViewProviderDelegate> _Nullable viewProviderDelegate; |
|
1638 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
1639 |
/// Initialize the Didomi SDK |
|
1640 |
/// \param parameters object specifying parameters to initialize the SDK. |
|
1641 |
/// |
|
1642 |
- (void)initialize:(DidomiInitializeParameters * _Nonnull)parameters; |
|
1643 |
/// Set custom user agent name and version. |
|
1644 |
/// \param name Agent name. |
|
1645 |
/// |
|
1646 |
/// \param version Agent version. |
|
1647 |
/// |
|
1648 |
- (void)setUserAgentWithName:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; |
|
1649 |
/// Set the user consent status. |
|
1650 |
/// \param enabledPurposeIds set containing <em>enabled purpose ids</em> |
|
1651 |
/// |
|
1652 |
/// \param disabledPurposeIds set containing <em>disabled purpose ids</em> |
|
1653 |
/// |
|
1654 |
/// \param enabledVendorIds set containing <em>enabled vendor ids</em> |
|
1655 |
/// |
|
1656 |
/// \param disabledVendorIds set containing <em>disabled purpose ids</em> |
|
1657 |
/// |
|
1658 |
/// |
|
1659 |
/// returns: |
|
1660 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
1661 |
- (BOOL)setUserConsentStatusWithEnabledPurposeIds:(NSSet<NSString *> * _Nonnull)enabledPurposeIds disabledPurposeIds:(NSSet<NSString *> * _Nonnull)disabledPurposeIds enabledVendorIds:(NSSet<NSString *> * _Nonnull)enabledVendorIds disabledVendorIds:(NSSet<NSString *> * _Nonnull)disabledVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
1662 |
/// Determine if the user is subject to a regulation that requires consent collection. |
|
1663 |
/// This along with the choices that the user has or has not made |
|
1664 |
/// will determine each time that the SDK is initialized if the notice should be displayed or not. |
|
1665 |
/// |
|
1666 |
/// returns: |
|
1667 |
/// <em>true</em> if consent is required, <em>false</em> if it is not required. |
|
1668 |
- (BOOL)isConsentRequired SWIFT_WARN_UNUSED_RESULT; |
|
1669 |
/// Determine if consent information is available for all purposes and vendors that are required |
|
1670 |
/// |
|
1671 |
/// returns: |
|
1672 |
/// <em>true</em> if consent is required and consent information is available, <em>false</em> otherwise. |
|
1673 |
- (BOOL)isUserConsentStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
1674 |
/// Determine if legitimate interest information is available for all purposes and vendors that are required |
|
1675 |
/// |
|
1676 |
/// returns: |
|
1677 |
/// <em>true</em> if consent is required and legitimate interest information is available, <em>false</em> otherwise. |
|
1678 |
- (BOOL)isUserLegitimateInterestStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
1679 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
1680 |
/// \param purposesConsentStatus boolean used to determine if consent will be enabled or disabled for all purposes. |
|
1681 |
/// |
|
1682 |
/// \param purposesLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all purposes. |
|
1683 |
/// |
|
1684 |
/// \param vendorsConsentStatus boolean used to determine if consent will be enabled or disabled for all vendors. |
|
1685 |
/// |
|
1686 |
/// \param vendorsLIStatus boolean used to determine if legitimate interest will be enabled or disabled for all vendors. |
|
1687 |
/// |
|
1688 |
/// |
|
1689 |
/// returns: |
|
1690 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
1691 |
- (BOOL)setUserStatusWithPurposesConsentStatus:(BOOL)purposesConsentStatus purposesLIStatus:(BOOL)purposesLIStatus vendorsConsentStatus:(BOOL)vendorsConsentStatus vendorsLIStatus:(BOOL)vendorsLIStatus; |
|
1692 |
/// Set the user status for purposes and vendors for consent and legitimate interest. |
|
1693 |
/// \param enabledConsentPurposeIds List of purpose IDs to enable for consent. |
|
1694 |
/// |
|
1695 |
/// \param disabledConsentPurposeIds List of purpose IDs to disable for consent. |
|
1696 |
/// |
|
1697 |
/// \param enabledLIPurposeIds List of purpose IDs to enable for LI. |
|
1698 |
/// |
|
1699 |
/// \param disabledLIPurposeIds List of purpose IDs to disable for LI. |
|
1700 |
/// |
|
1701 |
/// \param enabledConsentVendorIds List of vendor IDs to enable for consent. |
|
1702 |
/// |
|
1703 |
/// \param disabledConsentVendorIds List of vendor IDs to disable for consent. |
|
1704 |
/// |
|
1705 |
/// \param enabledLIVendorIds List of vendor IDs to enable for LI. |
|
1706 |
/// |
|
1707 |
/// \param disabledLIVendorIds List of vendor IDs to disable for LI. |
|
1708 |
/// |
|
1709 |
- (BOOL)setUserStatusWithEnabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)enabledConsentPurposeIds disabledConsentPurposeIds:(NSSet<NSString *> * _Nonnull)disabledConsentPurposeIds enabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)enabledLIPurposeIds disabledLIPurposeIds:(NSSet<NSString *> * _Nonnull)disabledLIPurposeIds enabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)enabledConsentVendorIds disabledConsentVendorIds:(NSSet<NSString *> * _Nonnull)disabledConsentVendorIds enabledLIVendorIds:(NSSet<NSString *> * _Nonnull)enabledLIVendorIds disabledLIVendorIds:(NSSet<NSString *> * _Nonnull)disabledLIVendorIds; |
|
1710 |
/// Method that allows to enable consent and legitimate interest for all the required purposes. |
|
1711 |
/// |
|
1712 |
/// returns: |
|
1713 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
1714 |
- (BOOL)setUserAgreeToAll; |
|
1715 |
/// Method that allows to disable consent and legitimate interest for all the required purposes and vendors. |
|
1716 |
/// |
|
1717 |
/// returns: |
|
1718 |
/// <em>true</em> if consent status has been updated, <em>false</em> otherwise. |
|
1719 |
- (BOOL)setUserDisagreeToAll; |
|
1720 |
/// Provide a function that needs to be called once the SDK is ready |
|
1721 |
/// Automatically call the function if the SDK is already ready (that’s why this is not a standard event) |
|
1722 |
- (void)onReadyWithCallback:(void (^ _Nonnull)(void))callback; |
|
1723 |
/// Accepts a closure that will be called if an unexpected situation occurs. |
|
1724 |
/// \param callback closure to be called if an unexpected situation occurs. |
|
1725 |
/// |
|
1726 |
- (void)onErrorWithCallback:(void (^ _Nonnull)(DDMErrorEvent * _Nonnull))callback; |
|
1727 |
/// Listen for changes on the status of a vendor. |
|
1728 |
/// \param id vendor ID. |
|
1729 |
/// |
|
1730 |
/// \param callback callback to be executed when there are changes on the specified vendor. |
|
1731 |
/// |
|
1732 |
- (void)addVendorStatusListenerWithId:(NSString * _Nonnull)id :(void (^ _Nonnull)(DDMCurrentUserStatusVendor * _Nonnull))callback; |
|
1733 |
/// Stop listening for changes on the status of a vendor. |
|
1734 |
/// \param id vendor ID. |
|
1735 |
/// |
|
1736 |
- (void)removeVendorStatusListenerWithId:(NSString * _Nonnull)id; |
|
1737 |
/// Remove all consents for the user |
|
1738 |
- (void)reset; |
|
1739 |
/// Get the configured purpose IDs |
|
1740 |
/// @return |
|
1741 |
- (NSSet<NSString *> * _Nonnull)getRequiredPurposeIds SWIFT_WARN_UNUSED_RESULT; |
|
1742 |
/// Get the configured vendor IDs |
|
1743 |
/// @return |
|
1744 |
- (NSSet<NSString *> * _Nonnull)getRequiredVendorIds SWIFT_WARN_UNUSED_RESULT; |
|
1745 |
/// Add an event listener |
|
1746 |
/// \param listener listener to be added. |
|
1747 |
/// |
|
1748 |
- (void)addEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
1749 |
/// Remove an event listener |
|
1750 |
/// \param listener listener to be removed. |
|
1751 |
/// |
|
1752 |
- (void)removeEventListenerWithListener:(DDMEventListener * _Nonnull)listener; |
|
1753 |
/// Is the Didomi SDK ready? |
|
1754 |
- (BOOL)isReady SWIFT_WARN_UNUSED_RESULT; |
|
1755 |
/// Method used to get an array of required purposes. |
|
1756 |
/// |
|
1757 |
/// returns: |
|
1758 |
/// array of required purposes. |
|
1759 |
- (NSArray<DDMPurpose *> * _Nonnull)getRequiredPurposes SWIFT_WARN_UNUSED_RESULT; |
|
1760 |
/// Method used to get an array of required vendors. |
|
1761 |
/// |
|
1762 |
/// returns: |
|
1763 |
/// array of required vendors. |
|
1764 |
- (NSArray<DDMVendor *> * _Nonnull)getRequiredVendors SWIFT_WARN_UNUSED_RESULT; |
|
1765 |
/// Method used to get a Purpose based on its ID. |
|
1766 |
/// \param purposeId purpose ID used in the search. |
|
1767 |
/// |
|
1768 |
/// |
|
1769 |
/// returns: |
|
1770 |
/// purpose found in the array. |
|
1771 |
- (DDMPurpose * _Nullable)getPurposeWithPurposeId:(NSString * _Nonnull)purposeId SWIFT_WARN_UNUSED_RESULT; |
|
1772 |
/// Method used to get a Vendor based on its ID. |
|
1773 |
/// \param vendorId vendor ID used in the search. |
|
1774 |
/// |
|
1775 |
/// |
|
1776 |
/// returns: |
|
1777 |
/// vendor found in the array. |
|
1778 |
- (DDMVendor * _Nullable)getVendorWithVendorId:(NSString * _Nonnull)vendorId SWIFT_WARN_UNUSED_RESULT; |
|
1779 |
/// Get number of vendors. |
|
1780 |
/// <ul> |
|
1781 |
/// <li> |
|
1782 |
/// Returns the count of all vendors |
|
1783 |
/// </li> |
|
1784 |
/// </ul> |
|
1785 |
- (NSInteger)getTotalVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
1786 |
/// Get number of IAB vendors |
|
1787 |
/// <ul> |
|
1788 |
/// <li> |
|
1789 |
/// Returns the count of IAB vendors |
|
1790 |
/// </li> |
|
1791 |
/// </ul> |
|
1792 |
- (NSInteger)getIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
1793 |
/// Get number of non-IAB vendors |
|
1794 |
/// <ul> |
|
1795 |
/// <li> |
|
1796 |
/// Returns the count of non-IAB vendors |
|
1797 |
/// </li> |
|
1798 |
/// </ul> |
|
1799 |
- (NSInteger)getNonIABVendorCount SWIFT_WARN_UNUSED_RESULT; |
|
1800 |
/// Get JavaScript to embed into a WebView to pass the consent status from the app |
|
1801 |
/// to the Didomi Web SDK embedded into the WebView |
|
1802 |
/// Inject the returned JavaScript into a WebView |
|
1803 |
/// \param extra Extra JavaScript to inject in the returned code |
|
1804 |
/// |
|
1805 |
/// |
|
1806 |
/// returns: |
|
1807 |
/// JavaScript code to inject in a WebView |
|
1808 |
- (NSString * _Nonnull)getJavaScriptForWebViewWithExtra:(NSString * _Nonnull)extra SWIFT_WARN_UNUSED_RESULT; |
|
1809 |
/// 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. |
|
1810 |
/// The returned parameter will have the format <code>didomiConfig.user.externalConsent.value=...</code> It includes the user consent information URL-encoded and JSON-encoded. |
|
1811 |
/// Append the returned query-string parameter to the URL of your WebView or SFSafariViewController. |
|
1812 |
/// See https://developers.didomi.io/cmp/mobile-sdk/share-consent-with-webviews for more information. |
|
1813 |
/// |
|
1814 |
/// returns: |
|
1815 |
/// Query string parameter to append to URL |
|
1816 |
- (NSString * _Nonnull)getQueryStringForWebView SWIFT_WARN_UNUSED_RESULT; |
|
1817 |
/// Method used to update the selected language of the Didomi SDK and any property that depends on it. |
|
1818 |
/// 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. |
|
1819 |
/// 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. |
|
1820 |
/// \param languageCode string containing the language code e.g.: “es”, “fr”, etc. |
|
1821 |
/// |
|
1822 |
- (void)updateSelectedLanguageWithLanguageCode:(NSString * _Nonnull)languageCode; |
|
1823 |
@end |
|
1824 |
|
|
1825 |
typedef SWIFT_ENUM(NSInteger, Views, open) { |
|
1826 |
ViewsPurposes = 0, |
|
1827 |
ViewsSensitivePersonalInformation = 1, |
|
1828 |
ViewsVendors = 2, |
|
1829 |
}; |
|
1830 |
|
|
1831 |
@class UIViewController; |
|
1832 |
|
|
1833 |
/// Protocol used to provide the view controllers for the preferences/purposes and notice view. |
|
1834 |
/// To provide customs views, this protocol will have to be implemented. |
|
1835 |
/// This protocol is implemented by the Didomi singleton to provide the default view controllers. |
|
1836 |
SWIFT_PROTOCOL("_TtP6Didomi20ViewProviderDelegate_") |
|
1837 |
@protocol ViewProviderDelegate |
|
1838 |
/// Method used to provide a view controller that will be used to display the notice. |
|
1839 |
/// \param position string that represents the position of the notice (e.g.: bottom, popup, etc.). |
|
1840 |
/// |
|
1841 |
/// \param skipped Whether notice display is skipped and Preferences are displayed directly |
|
1842 |
/// |
|
1843 |
/// |
|
1844 |
/// returns: |
|
1845 |
/// the view controller associated to the notice. |
|
1846 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
1847 |
/// Method used to provide a view controller that will be used to display the preferences/purposes view. |
|
1848 |
/// |
|
1849 |
/// returns: |
|
1850 |
/// the view controller associated to the preferences/purposes view. |
|
1851 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
1852 |
@end |
|
1853 |
|
|
1854 |
|
|
1855 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) <ViewProviderDelegate> |
|
1856 |
- (UIViewController * _Nonnull)getNoticeViewControllerWithPosition:(NSString * _Nonnull)position noticeSkipped:(BOOL)noticeSkipped SWIFT_WARN_UNUSED_RESULT; |
|
1857 |
- (UIViewController * _Nonnull)getPreferencesViewController SWIFT_WARN_UNUSED_RESULT; |
|
1858 |
@end |
|
1859 |
|
|
1860 |
@class UserAuthParams; |
|
1861 |
@class DDMUserStatus; |
|
1862 |
|
|
1863 |
@interface Didomi (SWIFT_EXTENSION(Didomi)) |
|
1864 |
/// Provide the objects required to display UI elements |
|
1865 |
- (void)setupUIWithContainerController:(UIViewController * _Nonnull)containerController; |
|
1866 |
/// Force show the consent notice without checking if consent is required |
|
1867 |
/// Important: Do not keep a local reference to the View Controller itself as that could create a memory leak |
|
1868 |
- (void)forceShowNotice; |
|
1869 |
/// Show the consent notice (if required, not disabled in the config and not already displayed) |
|
1870 |
- (void)showNotice; |
|
1871 |
/// Hide the notice if it is currently displayed |
|
1872 |
- (void)hideNotice; |
|
1873 |
/// Check if the consent notice is currently displayed |
|
1874 |
/// @return |
|
1875 |
- (BOOL)isNoticeVisible SWIFT_WARN_UNUSED_RESULT; |
|
1876 |
/// 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 |
|
1877 |
/// |
|
1878 |
/// returns: |
|
1879 |
/// A boolean depending if the consent should be collected or not |
|
1880 |
- (BOOL)shouldConsentBeCollected SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_MSG("Use shouldUserStatusBeCollected() instead."); |
|
1881 |
/// Determine if the User Status (consent) should be collected or not. User Status should be collected if: |
|
1882 |
/// <ul> |
|
1883 |
/// <li> |
|
1884 |
/// Regulation is different from NONE and |
|
1885 |
/// </li> |
|
1886 |
/// <li> |
|
1887 |
/// User status is partial and |
|
1888 |
/// </li> |
|
1889 |
/// <li> |
|
1890 |
/// The number of days before displaying the notice again has exceeded the limit specified on the Console or no User Status has been saved |
|
1891 |
/// </li> |
|
1892 |
/// </ul> |
|
1893 |
/// |
|
1894 |
/// returns: |
|
1895 |
/// A boolean depending if the User Status (consent) should be collected or not |
|
1896 |
- (BOOL)shouldUserStatusBeCollected SWIFT_WARN_UNUSED_RESULT; |
|
1897 |
/// Check if user status is partial |
|
1898 |
/// |
|
1899 |
/// returns: |
|
1900 |
/// <em>true</em> if user status is partial, <em>false</em> otherwise |
|
1901 |
- (BOOL)isUserStatusPartial SWIFT_WARN_UNUSED_RESULT; |
|
1902 |
/// Show the preferences screen when/if the SDK is ready. By default the purposes list will be displayed. |
|
1903 |
/// \param controller view controller from where preferences will be presented. |
|
1904 |
/// |
|
1905 |
/// \param view a value from <code>Didomi.Views</code>. It can be <code>.purposes</code> or <code>.sensitivePersonalInformation</code> or <code>.vendors</code> (<code>ViewsPurposes</code> or <code>ViewsSensitivePersonalInformation</code> or <code>ViewsVendors</code> in Objective-C) |
|
1906 |
/// |
|
1907 |
- (void)showPreferencesWithController:(UIViewController * _Nullable)controller view:(enum Views)view; |
|
1908 |
/// Hide the preferences popup for purposes |
|
1909 |
- (void)hidePreferences; |
|
1910 |
/// Method used to check if the Preferences view is visible. |
|
1911 |
/// |
|
1912 |
/// returns: |
|
1913 |
/// <em>true</em> if Preferences view is visible, <em>false</em> otherwise. |
|
1914 |
- (BOOL)isPreferencesVisible SWIFT_WARN_UNUSED_RESULT; |
|
1915 |
/// Method used to get a translated text based on the key being passed. |
|
1916 |
/// The language and the source of this translated text will depend on the availability of the translation for the specific key. |
|
1917 |
/// 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 <code>didomi_config.json</code> file which can be either local or remote, or the <code>didomi_master_config.json</code> file which is bundled within the SDK. |
|
1918 |
/// These are the attempts performed by the SDK to try to find a translation for the specific key: |
|
1919 |
/// <ul> |
|
1920 |
/// <li> |
|
1921 |
/// Get translated value in user locale (selected language) from <code>didomi_config.json</code> (either local or remote). |
|
1922 |
/// </li> |
|
1923 |
/// <li> |
|
1924 |
/// Get translated value in default locale (from the config) from <code>didomi_config.json</code> (either local or remote). |
|
1925 |
/// </li> |
|
1926 |
/// <li> |
|
1927 |
/// Get translated value in user locale (selected language) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
1928 |
/// </li> |
|
1929 |
/// <li> |
|
1930 |
/// Get translated value in default locale (from the config) from <code>didomi_master_config.json</code> (bundled within the Didomi SDK). |
|
1931 |
/// </li> |
|
1932 |
/// </ul> |
|
1933 |
/// If no translation can be found after these 4 attempts, the key will be returned. |
|
1934 |
/// App developers can provide these translated texts through the <code>didomi_config.json</code> file (locally or remotely) in 3 different ways: |
|
1935 |
/// <ul> |
|
1936 |
/// <li> |
|
1937 |
/// Custom texts for the consent notice: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-notice#texts |
|
1938 |
/// </li> |
|
1939 |
/// <li> |
|
1940 |
/// Custom texts for the preferences: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-preferences-popup#text |
|
1941 |
/// </li> |
|
1942 |
/// <li> |
|
1943 |
/// Custom texts for custom notices: https://developers.didomi.io/cmp/mobile-sdk/consent-notice/customize-the-theme#translatable-texts-for-custom-notices |
|
1944 |
/// </li> |
|
1945 |
/// </ul> |
|
1946 |
/// \param key used to find its corresponding value in one of the different sources. |
|
1947 |
/// |
|
1948 |
/// |
|
1949 |
/// returns: |
|
1950 |
/// a translated string if a translation was found, the same key that was passed otherwise. |
|
1951 |
- (NSString * _Nonnull)getTranslatedTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
1952 |
/// Method used to get a dictionary/map in the form of { “en”: “Key in English”, “fr”: “Key in French.” } |
|
1953 |
/// for a given key. |
|
1954 |
/// \param key used to find its corresponding value in the dictionary/map. |
|
1955 |
/// |
|
1956 |
/// |
|
1957 |
/// returns: |
|
1958 |
/// dictionary containing the different translations for a given key. |
|
1959 |
- (NSDictionary<NSString *, NSString *> * _Nullable)getTextWithKey:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT; |
|
1960 |
/// Set the minimum level of messages to log |
|
1961 |
/// Messages with a level below <code>minLevel</code> will not be logged. |
|
1962 |
/// Levels are standard levels from <code>OSLogType</code> (https://developer.apple.com/documentation/os/logging/choosing_the_log_level_for_a_message): |
|
1963 |
/// <ul> |
|
1964 |
/// <li> |
|
1965 |
/// OSLogType.info (1) |
|
1966 |
/// </li> |
|
1967 |
/// <li> |
|
1968 |
/// OSLogType.debug (2) |
|
1969 |
/// </li> |
|
1970 |
/// <li> |
|
1971 |
/// OSLogType.error (16) |
|
1972 |
/// </li> |
|
1973 |
/// <li> |
|
1974 |
/// OSLogType.fault (17) |
|
1975 |
/// </li> |
|
1976 |
/// </ul> |
|
1977 |
/// We recommend setting <code>OSLogType.error</code> (16) in production |
|
1978 |
/// \param minLevel Minimum level of messages to log |
|
1979 |
/// |
|
1980 |
- (void)setLogLevelWithMinLevel:(uint8_t)minLevel; |
|
1981 |
/// Set organization user information |
|
1982 |
/// \param id Organization user ID |
|
1983 |
/// |
|
1984 |
- (void)setUserWithId:(NSString * _Nonnull)id; |
|
1985 |
/// Set organization user information and display consent notice if it is needed after synchronization |
|
1986 |
/// \param id Organization user ID |
|
1987 |
/// |
|
1988 |
/// \param containerController View controller from which we can setup Didomi UI |
|
1989 |
/// |
|
1990 |
- (void)setUserWithId:(NSString * _Nonnull)id containerController:(UIViewController * _Nonnull)containerController; |
|
1991 |
/// Set organization user information with authentication |
|
1992 |
/// \param userAuthParams Organization user authentication params |
|
1993 |
/// |
|
1994 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams; |
|
1995 |
/// Set organization user information with authentication, and display consent notice if it is needed after synchronization |
|
1996 |
/// \param userAuthParams Organization user authentication params |
|
1997 |
/// |
|
1998 |
/// \param containerController View controller from which we can setup Didomi UI |
|
1999 |
/// |
|
2000 |
- (void)setUserWithUserAuthParams:(UserAuthParams * _Nonnull)userAuthParams containerController:(UIViewController * _Nonnull)containerController; |
|
2001 |
/// Remove organization user information (should be called when the SDK is initialized). |
|
2002 |
- (void)clearUser; |
|
2003 |
/// Get an instance of <code>UserStatus</code> containing all the information related to the user’s choices. |
|
2004 |
- (DDMUserStatus * _Nonnull)getUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
2005 |
/// Get an instance of <code>CurrentUserStatus</code> containing all the information related to the user’s choices. |
|
2006 |
- (DDMCurrentUserStatus * _Nonnull)getCurrentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
2007 |
/// Save user’s choices. |
|
2008 |
/// \param currentUserStatus instance of CurrentUserStatus containing the user’s choices. |
|
2009 |
/// |
|
2010 |
/// |
|
2011 |
/// returns: |
|
2012 |
/// <em>true</em> if user’s choices have been saved, <em>false</em> otherwise. |
|
2013 |
- (BOOL)setCurrentUserStatusWithCurrentUserStatus:(DDMCurrentUserStatus * _Nonnull)currentUserStatus SWIFT_WARN_UNUSED_RESULT; |
|
2014 |
/// Create an instance of the<code>CurrentUserStatusTransaction</code> class. |
|
2015 |
/// This class is used to asynchronously enable and disable purposes and vendors through different methods. |
|
2016 |
/// These changes will not be reflected on the user status until the <code>commit</code> method of the returned object is called. |
|
2017 |
/// |
|
2018 |
/// returns: |
|
2019 |
/// an instance of the <code>CurrentUserStatusTransaction</code> class |
|
2020 |
- (CurrentUserStatusTransaction * _Nonnull)openCurrentUserStatusTransaction SWIFT_WARN_UNUSED_RESULT; |
|
2021 |
@end |
|
2022 |
|
|
2023 |
enum DDMErrorEventType : NSInteger; |
|
2024 |
|
|
2025 |
/// Type used to represent unexpected situations during SDK initialization. |
|
2026 |
SWIFT_CLASS_NAMED("DidomiErrorEvent") |
|
2027 |
@interface DDMErrorEvent : NSObject |
|
2028 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
2029 |
@property (nonatomic, readonly) enum DDMErrorEventType type; |
|
2030 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2031 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2032 |
@end |
|
2033 |
|
|
2034 |
/// Enum used to represent a type for the DidomiErrorEvent class. |
|
2035 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMErrorEventType, "DidomiErrorEventType", open) { |
|
2036 |
DDMErrorEventTypeNilProperty = 0, |
|
2037 |
DDMErrorEventTypeNotReady = 1, |
|
2038 |
DDMErrorEventTypeFailedAlready = 2, |
|
2039 |
DDMErrorEventTypeConfigFileError = 3, |
|
2040 |
DDMErrorEventTypeInvalidApiKey = 4, |
|
2041 |
}; |
|
2042 |
|
|
2043 |
|
|
2044 |
/// Initialization parameters for Didomi SDK |
|
2045 |
SWIFT_CLASS("_TtC6Didomi26DidomiInitializeParameters") |
|
2046 |
@interface DidomiInitializeParameters : NSObject |
|
2047 |
- (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; |
|
2048 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2049 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2050 |
@end |
|
2051 |
|
|
2052 |
|
|
2053 |
enum DDMEventType : NSInteger; |
|
2054 |
|
|
2055 |
/// Class used as a listener for internal events occurred in the SDK. |
|
2056 |
SWIFT_CLASS_NAMED("EventListener") |
|
2057 |
@interface DDMEventListener : NSObject |
|
2058 |
/// Closures used to execute code when the different events are triggered. |
|
2059 |
/// Internal |
|
2060 |
@property (nonatomic, copy) void (^ _Nonnull onConsentChanged)(enum DDMEventType); |
|
2061 |
@property (nonatomic, copy) void (^ _Nonnull onReady)(enum DDMEventType); |
|
2062 |
@property (nonatomic, copy) void (^ _Nonnull onError)(DDMErrorEvent * _Nonnull); |
|
2063 |
/// Notice |
|
2064 |
@property (nonatomic, copy) void (^ _Nonnull onHideNotice)(enum DDMEventType); |
|
2065 |
@property (nonatomic, copy) void (^ _Nonnull onShowNotice)(enum DDMEventType); |
|
2066 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickAgree)(enum DDMEventType); |
|
2067 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickDisagree)(enum DDMEventType); |
|
2068 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickMoreInfo)(enum DDMEventType); |
|
2069 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewVendors)(enum DDMEventType); |
|
2070 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickViewSPIPurposes)(enum DDMEventType); |
|
2071 |
@property (nonatomic, copy) void (^ _Nonnull onNoticeClickPrivacyPolicy)(enum DDMEventType); |
|
2072 |
/// Preferences |
|
2073 |
@property (nonatomic, copy) void (^ _Nonnull onHidePreferences)(enum DDMEventType); |
|
2074 |
@property (nonatomic, copy) void (^ _Nonnull onShowPreferences)(enum DDMEventType); |
|
2075 |
/// Preferences - Views |
|
2076 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewPurposes)(enum DDMEventType); |
|
2077 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewVendors)(enum DDMEventType); |
|
2078 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickViewSPIPurposes)(enum DDMEventType); |
|
2079 |
/// Preferences - Purpose |
|
2080 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAll)(enum DDMEventType); |
|
2081 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAll)(enum DDMEventType); |
|
2082 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllPurposes)(enum DDMEventType); |
|
2083 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllPurposes)(enum DDMEventType); |
|
2084 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickResetAllPurposes)(enum DDMEventType); |
|
2085 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
2086 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
2087 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
2088 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickCategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
2089 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSaveChoices)(enum DDMEventType); |
|
2090 |
/// Preferences - Vendor |
|
2091 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickAgreeToAllVendors)(enum DDMEventType); |
|
2092 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickDisagreeToAllVendors)(enum DDMEventType); |
|
2093 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorAgree)(enum DDMEventType, NSString * _Nullable); |
|
2094 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorDisagree)(enum DDMEventType, NSString * _Nullable); |
|
2095 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickVendorSaveChoices)(enum DDMEventType); |
|
2096 |
/// Preferences - Sensitive Personal Information |
|
2097 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeAgree)(enum DDMEventType, NSString * _Nullable); |
|
2098 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeDisagree)(enum DDMEventType, NSString * _Nullable); |
|
2099 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryAgree)(enum DDMEventType, NSString * _Nullable); |
|
2100 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPICategoryDisagree)(enum DDMEventType, NSString * _Nullable); |
|
2101 |
@property (nonatomic, copy) void (^ _Nonnull onPreferencesClickSPIPurposeSaveChoices)(enum DDMEventType); |
|
2102 |
/// Sync |
|
2103 |
@property (nonatomic, copy) void (^ _Nonnull onSyncDone)(enum DDMEventType, NSString * _Nullable); |
|
2104 |
@property (nonatomic, copy) void (^ _Nonnull onSyncError)(enum DDMEventType, NSString * _Nullable); |
|
2105 |
/// Language |
|
2106 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdated)(enum DDMEventType, NSString * _Nullable); |
|
2107 |
@property (nonatomic, copy) void (^ _Nonnull onLanguageUpdateFailed)(enum DDMEventType, NSString * _Nullable); |
|
2108 |
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; |
|
2109 |
@end |
|
2110 |
|
|
2111 |
/// Enum used to define the different type of internal events that can be triggered from the SDK. |
|
2112 |
/// Please keep the current order because of Unity bridge. |
|
2113 |
typedef SWIFT_ENUM_NAMED(NSInteger, DDMEventType, "EventType", open) { |
|
2114 |
DDMEventTypeConsentChanged = 0, |
|
2115 |
DDMEventTypeHideNotice = 1, |
|
2116 |
DDMEventTypeReady = 2, |
|
2117 |
DDMEventTypeShowNotice = 3, |
|
2118 |
DDMEventTypeShowPreferences = 4, |
|
2119 |
DDMEventTypeHidePreferences = 5, |
|
2120 |
DDMEventTypeNoticeClickAgree = 6, |
|
2121 |
DDMEventTypeNoticeClickDisagree = 7, |
|
2122 |
DDMEventTypeNoticeClickMoreInfo = 8, |
|
2123 |
DDMEventTypeNoticeClickViewVendors = 9, |
|
2124 |
DDMEventTypeNoticeClickPrivacyPolicy = 10, |
|
2125 |
DDMEventTypePreferencesClickAgreeToAll = 11, |
|
2126 |
DDMEventTypePreferencesClickDisagreeToAll = 12, |
|
2127 |
DDMEventTypePreferencesClickAgreeToAllPurposes = 13, |
|
2128 |
DDMEventTypePreferencesClickDisagreeToAllPurposes = 14, |
|
2129 |
DDMEventTypePreferencesClickResetAllPurposes = 15, |
|
2130 |
DDMEventTypePreferencesClickAgreeToAllVendors = 16, |
|
2131 |
DDMEventTypePreferencesClickDisagreeToAllVendors = 17, |
|
2132 |
DDMEventTypePreferencesClickPurposeAgree = 18, |
|
2133 |
DDMEventTypePreferencesClickPurposeDisagree = 19, |
|
2134 |
DDMEventTypePreferencesClickCategoryAgree = 20, |
|
2135 |
DDMEventTypePreferencesClickCategoryDisagree = 21, |
|
2136 |
DDMEventTypePreferencesClickViewVendors = 22, |
|
2137 |
DDMEventTypePreferencesClickViewPurposes = 23, |
|
2138 |
DDMEventTypePreferencesClickSaveChoices = 24, |
|
2139 |
DDMEventTypePreferencesClickVendorAgree = 25, |
|
2140 |
DDMEventTypePreferencesClickVendorDisagree = 26, |
|
2141 |
DDMEventTypePreferencesClickVendorSaveChoices = 27, |
|
2142 |
/// Sync |
|
2143 |
DDMEventTypeSyncDone = 28, |
|
2144 |
DDMEventTypeSyncError = 29, |
|
2145 |
/// Language |
|
2146 |
DDMEventTypeLanguageUpdated = 30, |
|
2147 |
DDMEventTypeLanguageUpdateFailed = 31, |
|
2148 |
/// Preferences - Sensitive Personal Information |
|
2149 |
DDMEventTypeNoticeClickViewSPIPurposes = 32, |
|
2150 |
DDMEventTypePreferencesClickViewSPIPurposes = 33, |
|
2151 |
DDMEventTypePreferencesClickSPIPurposeAgree = 34, |
|
2152 |
DDMEventTypePreferencesClickSPIPurposeDisagree = 35, |
|
2153 |
DDMEventTypePreferencesClickSPICategoryAgree = 36, |
|
2154 |
DDMEventTypePreferencesClickSPICategoryDisagree = 37, |
|
2155 |
DDMEventTypePreferencesClickSPIPurposeSaveChoices = 38, |
|
2156 |
}; |
|
2157 |
|
|
2158 |
|
|
2159 |
|
|
2160 |
|
|
2161 |
|
|
2162 |
|
|
2163 |
|
|
2164 |
|
|
2165 |
|
|
2166 |
/// Public class representing a single Purpose configuration. |
|
2167 |
SWIFT_CLASS_NAMED("Purpose") |
|
2168 |
@interface DDMPurpose : NSObject |
|
2169 |
/// Purpose id used by Didomi SDK. |
|
2170 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
2171 |
/// Purpose human-readable name, translated in selected language. |
|
2172 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
2173 |
/// Purpose description, translated in selected language. |
|
2174 |
@property (nonatomic, readonly, copy) NSString * _Nonnull descriptionText; |
|
2175 |
/// Initializer method for the Purpose class. |
|
2176 |
/// \param id Purpose id used by Didomi SDK. |
|
2177 |
/// |
|
2178 |
/// \param name Purpose human-readable name, translated in selected language. |
|
2179 |
/// |
|
2180 |
/// \param descriptionText Purpose description, translated in selected language. |
|
2181 |
/// |
|
2182 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name descriptionText:(NSString * _Nonnull)descriptionText OBJC_DESIGNATED_INITIALIZER; |
|
2183 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2184 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2185 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2186 |
@end |
|
2187 |
|
|
2188 |
|
|
2189 |
/// Regulation for which Didomi SDK is currently configured. Only one regulation is active at each run. |
|
2190 |
typedef SWIFT_ENUM(NSInteger, Regulation, open) { |
|
2191 |
RegulationGdpr = 0, |
|
2192 |
RegulationCcpa = 1, |
|
2193 |
RegulationCpa = 2, |
|
2194 |
RegulationCpra = 3, |
|
2195 |
RegulationCtdpa = 4, |
|
2196 |
RegulationUcpa = 5, |
|
2197 |
RegulationVcdpa = 6, |
|
2198 |
RegulationNone = 7, |
|
2199 |
}; |
|
2200 |
|
|
2201 |
|
|
2202 |
|
|
2203 |
|
|
2204 |
|
|
2205 |
|
|
2206 |
|
|
2207 |
|
|
2208 |
|
|
2209 |
|
|
2210 |
|
|
2211 |
|
|
2212 |
|
|
2213 |
|
|
2214 |
|
|
2215 |
|
|
2216 |
|
|
2217 |
|
|
2218 |
|
|
2219 |
|
|
2220 |
|
|
2221 |
|
|
2222 |
/// Protocol for User Authentication |
|
2223 |
/// declare the user id |
|
2224 |
SWIFT_PROTOCOL("_TtP6Didomi8UserAuth_") |
|
2225 |
@protocol UserAuth |
|
2226 |
/// Organization ID to associate with the user |
|
2227 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
2228 |
@end |
|
2229 |
|
|
2230 |
|
|
2231 |
/// Protocol for User Authentication Parameters |
|
2232 |
/// declare the common properties of encryption / hash parameters |
|
2233 |
SWIFT_CLASS("_TtC6Didomi14UserAuthParams") |
|
2234 |
@interface UserAuthParams : NSObject <UserAuth> |
|
2235 |
/// Organization ID to associate with the user |
|
2236 |
@property (nonatomic, copy) NSString * _Nonnull id; |
|
2237 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2238 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2239 |
@end |
|
2240 |
|
|
2241 |
|
|
2242 |
/// User Authentication Parameters with encryption |
|
2243 |
SWIFT_CLASS("_TtC6Didomi28UserAuthWithEncryptionParams") |
|
2244 |
@interface UserAuthWithEncryptionParams : UserAuthParams |
|
2245 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector; |
|
2246 |
/// Initializer for Objective-C |
|
2247 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID initializationVector:(NSString * _Nonnull)initializationVector legacyExpiration:(NSTimeInterval)legacyExpiration; |
|
2248 |
/// Initialization Vector used for computing the user ID |
|
2249 |
@property (nonatomic, copy) NSString * _Nonnull initializationVector; |
|
2250 |
@end |
|
2251 |
|
|
2252 |
|
|
2253 |
/// User Authentication Parameters with hash |
|
2254 |
SWIFT_CLASS("_TtC6Didomi22UserAuthWithHashParams") |
|
2255 |
@interface UserAuthWithHashParams : UserAuthParams |
|
2256 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id algorithm:(NSString * _Nonnull)algorithm secretID:(NSString * _Nonnull)secretID digest:(NSString * _Nonnull)digest salt:(NSString * _Nullable)salt; |
|
2257 |
/// Initializer for Objective-C |
|
2258 |
- (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; |
|
2259 |
/// Salt used for computing the user ID (optional) |
|
2260 |
@property (nonatomic, copy) NSString * _Nullable salt; |
|
2261 |
/// Digest used for representing the user ID |
|
2262 |
@property (nonatomic, copy) NSString * _Nonnull digest; |
|
2263 |
@end |
|
2264 |
|
|
2265 |
@class DDMUserStatusPurposes; |
|
2266 |
@class DDMUserStatusVendors; |
|
2267 |
|
|
2268 |
SWIFT_CLASS_NAMED("UserStatus") |
|
2269 |
@interface DDMUserStatus : NSObject |
|
2270 |
@property (nonatomic, readonly, strong) DDMUserStatusPurposes * _Nonnull purposes; |
|
2271 |
@property (nonatomic, readonly, strong) DDMUserStatusVendors * _Nonnull vendors; |
|
2272 |
@property (nonatomic, readonly, copy) NSString * _Nonnull userID; |
|
2273 |
@property (nonatomic, readonly, copy) NSString * _Nonnull created; |
|
2274 |
@property (nonatomic, readonly, copy) NSString * _Nonnull updated; |
|
2275 |
@property (nonatomic, readonly, copy) NSString * _Nonnull consentString; |
|
2276 |
@property (nonatomic, readonly, copy) NSString * _Nonnull additionalConsent; |
|
2277 |
@property (nonatomic, readonly) enum Regulation regulation; |
|
2278 |
@property (nonatomic, readonly, copy) NSString * _Nonnull didomiDCS; |
|
2279 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2280 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2281 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2282 |
@end |
|
2283 |
|
|
2284 |
|
|
2285 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
2286 |
@end |
|
2287 |
|
|
2288 |
@class DDMUserStatusIDs; |
|
2289 |
|
|
2290 |
SWIFT_CLASS_NAMED("Vendors") |
|
2291 |
@interface DDMUserStatusVendors : NSObject |
|
2292 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
2293 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
2294 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
2295 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalConsent; |
|
2296 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull globalLegitimateInterest; |
|
2297 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2298 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2299 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2300 |
@end |
|
2301 |
|
|
2302 |
|
|
2303 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
2304 |
@end |
|
2305 |
|
|
2306 |
|
|
2307 |
SWIFT_CLASS_NAMED("IDs") |
|
2308 |
@interface DDMUserStatusIDs : NSObject |
|
2309 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull enabled; |
|
2310 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull disabled; |
|
2311 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2312 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2313 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2314 |
@end |
|
2315 |
|
|
2316 |
|
|
2317 |
@interface DDMUserStatus (SWIFT_EXTENSION(Didomi)) |
|
2318 |
@end |
|
2319 |
|
|
2320 |
|
|
2321 |
SWIFT_CLASS_NAMED("Purposes") |
|
2322 |
@interface DDMUserStatusPurposes : NSObject |
|
2323 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull consent; |
|
2324 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull legitimateInterest; |
|
2325 |
@property (nonatomic, readonly, strong) DDMUserStatusIDs * _Nonnull global; |
|
2326 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull essential; |
|
2327 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2328 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2329 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2330 |
@end |
|
2331 |
|
|
2332 |
@class DDMVendorNamespaces; |
|
2333 |
@class DDMVendorURL; |
|
2334 |
|
|
2335 |
/// Public class representing a single Vendor configuration. |
|
2336 |
SWIFT_CLASS_NAMED("Vendor") |
|
2337 |
@interface DDMVendor : NSObject |
|
2338 |
/// Unique ID of the vendor provided by Didomi. This ID does not include prefixes. Example: “vendor-1”. |
|
2339 |
@property (nonatomic, readonly, copy) NSString * _Nonnull id; |
|
2340 |
/// Name of the vendor. |
|
2341 |
@property (nonatomic, readonly, copy) NSString * _Nonnull name; |
|
2342 |
/// Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
2343 |
@property (nonatomic, readonly, strong) DDMVendorNamespaces * _Nullable namespaces; |
|
2344 |
/// URL to the privacy policy of the vendor. |
|
2345 |
@property (nonatomic, readonly, copy) NSString * _Nullable policyUrl; |
|
2346 |
/// Purpose IDs that the vendor is operating under the consent legal basis. |
|
2347 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull purposeIDs; |
|
2348 |
/// Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
2349 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull legIntPurposeIDs; |
|
2350 |
/// Set with IDs that represent features. |
|
2351 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull featureIDs; |
|
2352 |
/// Set with IDs that represent flexible purposes. Introduced in IAB TCF v2. |
|
2353 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull flexiblePurposeIDs; |
|
2354 |
/// Set with IDs that represent Special Purposes. Introduced in IAB TCF v2. |
|
2355 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialPurposeIDs; |
|
2356 |
/// Set with IDs that represent Special Features. Introduced in IAB TCF v2. |
|
2357 |
@property (nonatomic, readonly, copy) NSSet<NSString *> * _Nonnull specialFeatureIDs; |
|
2358 |
/// Privacy policy and LI disclaimer urls. Introduced in IAB TCF v2.2. |
|
2359 |
@property (nonatomic, readonly, copy) NSArray<DDMVendorURL *> * _Nullable urls; |
|
2360 |
/// Initializer method for the Purpose class. |
|
2361 |
/// \param id Unique ID of the vendor. |
|
2362 |
/// |
|
2363 |
/// \param name Name of the vendor. |
|
2364 |
/// |
|
2365 |
/// \param policyUrl URL to the privacy policy of the vendor. |
|
2366 |
/// |
|
2367 |
/// \param namespaces Namespaces of the vendor (IAB, num) and their corresponding IDs. |
|
2368 |
/// |
|
2369 |
/// \param purposeIDs Purpose IDs that the vendor is operating under the consent legal basis. |
|
2370 |
/// |
|
2371 |
/// \param legIntPurposeIDs Purpose IDs that the vendor is operating under the legitimate interest legal basis. |
|
2372 |
/// |
|
2373 |
/// \param featureIDs Set with IDs that represent features. |
|
2374 |
/// |
|
2375 |
/// \param flexiblePurposeIDs Set with IDs that represent flexible purposes. |
|
2376 |
/// |
|
2377 |
/// \param specialPurposeIDs Set with IDs that represent Special Purposes. |
|
2378 |
/// |
|
2379 |
/// \param specialFeatureIDs Set with IDs that represent Special Features. |
|
2380 |
/// |
|
2381 |
/// \param urls Privacy policy and LI disclaimer urls. |
|
2382 |
/// |
|
2383 |
- (nonnull instancetype)initWithId:(NSString * _Nonnull)id name:(NSString * _Nonnull)name policyUrl:(NSString * _Nullable)policyUrl namespaces:(DDMVendorNamespaces * _Nullable)namespaces purposeIDs:(NSSet<NSString *> * _Nonnull)purposeIDs legIntPurposeIDs:(NSSet<NSString *> * _Nonnull)legIntPurposeIDs featureIDs:(NSSet<NSString *> * _Nonnull)featureIDs flexiblePurposeIDs:(NSSet<NSString *> * _Nonnull)flexiblePurposeIDs specialPurposeIDs:(NSSet<NSString *> * _Nonnull)specialPurposeIDs specialFeatureIDs:(NSSet<NSString *> * _Nonnull)specialFeatureIDs urls:(NSArray<DDMVendorURL *> * _Nullable)urls OBJC_DESIGNATED_INITIALIZER; |
|
2384 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2385 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2386 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2387 |
@end |
|
2388 |
|
|
2389 |
|
|
2390 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
2391 |
@end |
|
2392 |
|
|
2393 |
|
|
2394 |
/// Store additional IDs (IAB, num) for the Vendor. |
|
2395 |
SWIFT_CLASS_NAMED("Namespaces") |
|
2396 |
@interface DDMVendorNamespaces : NSObject |
|
2397 |
@property (nonatomic, readonly, copy) NSString * _Nullable iab2; |
|
2398 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2399 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2400 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2401 |
@end |
|
2402 |
|
|
2403 |
|
|
2404 |
@interface DDMVendor (SWIFT_EXTENSION(Didomi)) |
|
2405 |
@end |
|
2406 |
|
|
2407 |
|
|
2408 |
/// Store localized URLs for privacy policy and LI claim. |
|
2409 |
SWIFT_CLASS_NAMED("URL") |
|
2410 |
@interface DDMVendorURL : NSObject |
|
2411 |
@property (nonatomic, readonly, copy) NSString * _Nullable langID; |
|
2412 |
@property (nonatomic, readonly, copy) NSString * _Nullable privacy; |
|
2413 |
@property (nonatomic, readonly, copy) NSString * _Nullable legIntClaim; |
|
2414 |
- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; |
|
2415 |
- (nonnull instancetype)init SWIFT_UNAVAILABLE; |
|
2416 |
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); |
|
2417 |
@end |
|
2418 |
|
|
2419 |
|
|
2420 |
|
|
2421 |
#endif |
|
2422 |
#if defined(__cplusplus) |
|
2423 |
#endif |
|
2424 |
#if __has_attribute(external_source_symbol) |
|
2425 |
# pragma clang attribute pop |
|
2426 |
#endif |
|
2427 |
#pragma clang diagnostic pop |
|
2428 |
#endif |
|
2429 |
|
|
2430 |
#else |
|
2431 |
#error unsupported Swift architecture |
|
2432 |
#endif |