@@ -440,8 +440,8 @@ enum SPPrivacyManagerTab : NSInteger;
440
440
441
441
SWIFT_PROTOCOL("_TtP21ConsentViewController6SPCCPA_")
442
442
@protocol SPCCPA
443
- - (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)withId tab:(enum SPPrivacyManagerTab)tab;
444
- - (BOOL)ccpaApplies SWIFT_WARN_UNUSED_RESULT ;
443
+ - (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
444
+ @property (nonatomic, readonly) BOOL ccpaApplies ;
445
445
@end
446
446
447
447
@@ -546,57 +546,72 @@ SWIFT_PROTOCOL("_TtP21ConsentViewController17SPConsentDelegate_")
546
546
- (void)onErrorWithError:(SPError * _Nonnull)error;
547
547
@end
548
548
549
+ enum SPMessageLanguage : NSInteger;
550
+ @class SPPropertyName;
551
+
552
+ SWIFT_CLASS("_TtC21ConsentViewController16SPConsentManager")
553
+ @interface SPConsentManager : NSObject
554
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL shouldCallErrorMetrics;)
555
+ + (BOOL)shouldCallErrorMetrics SWIFT_WARN_UNUSED_RESULT;
556
+ + (void)setShouldCallErrorMetrics:(BOOL)value;
557
+ /// By default, the SDK will remove all user consent data from UserDefaults, possibly triggering a message to be displayed again next time
558
+ /// <code>.loadMessage</code> is called.
559
+ /// Set this flag to <code>false</code> if you wish to opt-out from this behaviour.
560
+ @property (nonatomic) BOOL cleanUserDataOnError;
561
+ /// The timeout interval in seconds for the message being displayed
562
+ @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
563
+ /// Instructs the privacy manager to be displayed with this tab.
564
+ /// By default the SDK will use the defult tab of PM
565
+ @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
566
+ /// Instructs the message to be displayed in this language. If the translation is missing, the fallback will be English.
567
+ /// By default the SDK will use the locale defined by the WebView
568
+ @property (nonatomic) enum SPMessageLanguage messageLanguage;
569
+ - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
570
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
571
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
572
+ @end
573
+
574
+
575
+
549
576
550
577
SWIFT_PROTOCOL("_TtP21ConsentViewController6SPGDPR_")
551
578
@protocol SPGDPR
552
- - (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)withId tab:(enum SPPrivacyManagerTab)tab;
553
- - (BOOL)gdprApplies SWIFT_WARN_UNUSED_RESULT ;
579
+ - (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
580
+ @property (nonatomic, readonly) BOOL gdprApplies ;
554
581
@end
555
582
556
583
@class SPGDPRConsent;
557
584
558
585
SWIFT_PROTOCOL("_TtP21ConsentViewController5SPSDK_")
559
586
@protocol SPSDK <SPCCPA, SPGDPR>
587
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
588
+ + (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
589
+ + (void)clearAllData;
590
+ @property (nonatomic) BOOL cleanUserDataOnError;
591
+ @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
592
+ @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
593
+ @property (nonatomic) enum SPMessageLanguage messageLanguage;
560
594
@property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
595
+ - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
561
596
- (void)loadMessageForAuthId:(NSString * _Nullable)authId;
562
597
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
563
598
@end
564
599
565
- @class SPPropertyName;
566
- enum SPMessageLanguage : NSInteger;
567
600
568
- SWIFT_CLASS("_TtC21ConsentViewController16SPConsentManager")
569
- @interface SPConsentManager : NSObject <SPSDK>
601
+ @interface SPConsentManager (SWIFT_EXTENSION(ConsentViewController)) <SPSDK>
570
602
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
571
603
+ (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
572
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL shouldCallErrorMetrics;)
573
- + (BOOL)shouldCallErrorMetrics SWIFT_WARN_UNUSED_RESULT;
574
- + (void)setShouldCallErrorMetrics:(BOOL)value;
575
- @property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
576
604
+ (void)clearAllData;
577
- /// The timeout interval in seconds for the message being displayed
578
- @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
579
- - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
580
- /// Instructs the privacy manager to be displayed with this tab.
581
- /// By default the SDK will use the defult tab of PM
582
- @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
583
- /// Instructs the message to be displayed in this language. If the translation is missing, the fallback will be English.
584
- /// By default the SDK will use the locale defined by the WebView
585
- @property (nonatomic) enum SPMessageLanguage messageLanguage;
605
+ @property (nonatomic, readonly) BOOL gdprApplies;
606
+ @property (nonatomic, readonly) BOOL ccpaApplies;
607
+ @property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
586
608
- (void)loadMessageForAuthId:(NSString * _Nullable)authId;
587
609
- (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
588
610
- (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
589
- - (BOOL)gdprApplies SWIFT_WARN_UNUSED_RESULT;
590
- - (BOOL)ccpaApplies SWIFT_WARN_UNUSED_RESULT;
591
611
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
592
- - (void)onError:(SPError * _Nonnull)error;
593
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
594
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
595
612
@end
596
613
597
614
598
-
599
-
600
615
SWIFT_PROTOCOL("_TtP21ConsentViewController19SPConsentUIDelegate_")
601
616
@protocol SPConsentUIDelegate
602
617
/// called when the user takes an action in the SP UI
@@ -1259,8 +1274,8 @@ enum SPPrivacyManagerTab : NSInteger;
1259
1274
1260
1275
SWIFT_PROTOCOL("_TtP21ConsentViewController6SPCCPA_")
1261
1276
@protocol SPCCPA
1262
- - (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)withId tab:(enum SPPrivacyManagerTab)tab;
1263
- - (BOOL)ccpaApplies SWIFT_WARN_UNUSED_RESULT ;
1277
+ - (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
1278
+ @property (nonatomic, readonly) BOOL ccpaApplies ;
1264
1279
@end
1265
1280
1266
1281
@@ -1365,57 +1380,72 @@ SWIFT_PROTOCOL("_TtP21ConsentViewController17SPConsentDelegate_")
1365
1380
- (void)onErrorWithError:(SPError * _Nonnull)error;
1366
1381
@end
1367
1382
1383
+ enum SPMessageLanguage : NSInteger;
1384
+ @class SPPropertyName;
1385
+
1386
+ SWIFT_CLASS("_TtC21ConsentViewController16SPConsentManager")
1387
+ @interface SPConsentManager : NSObject
1388
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL shouldCallErrorMetrics;)
1389
+ + (BOOL)shouldCallErrorMetrics SWIFT_WARN_UNUSED_RESULT;
1390
+ + (void)setShouldCallErrorMetrics:(BOOL)value;
1391
+ /// By default, the SDK will remove all user consent data from UserDefaults, possibly triggering a message to be displayed again next time
1392
+ /// <code>.loadMessage</code> is called.
1393
+ /// Set this flag to <code>false</code> if you wish to opt-out from this behaviour.
1394
+ @property (nonatomic) BOOL cleanUserDataOnError;
1395
+ /// The timeout interval in seconds for the message being displayed
1396
+ @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
1397
+ /// Instructs the privacy manager to be displayed with this tab.
1398
+ /// By default the SDK will use the defult tab of PM
1399
+ @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
1400
+ /// Instructs the message to be displayed in this language. If the translation is missing, the fallback will be English.
1401
+ /// By default the SDK will use the locale defined by the WebView
1402
+ @property (nonatomic) enum SPMessageLanguage messageLanguage;
1403
+ - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
1404
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1405
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1406
+ @end
1407
+
1408
+
1409
+
1368
1410
1369
1411
SWIFT_PROTOCOL("_TtP21ConsentViewController6SPGDPR_")
1370
1412
@protocol SPGDPR
1371
- - (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)withId tab:(enum SPPrivacyManagerTab)tab;
1372
- - (BOOL)gdprApplies SWIFT_WARN_UNUSED_RESULT ;
1413
+ - (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
1414
+ @property (nonatomic, readonly) BOOL gdprApplies ;
1373
1415
@end
1374
1416
1375
1417
@class SPGDPRConsent;
1376
1418
1377
1419
SWIFT_PROTOCOL("_TtP21ConsentViewController5SPSDK_")
1378
1420
@protocol SPSDK <SPCCPA, SPGDPR>
1421
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
1422
+ + (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
1423
+ + (void)clearAllData;
1424
+ @property (nonatomic) BOOL cleanUserDataOnError;
1425
+ @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
1426
+ @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
1427
+ @property (nonatomic) enum SPMessageLanguage messageLanguage;
1379
1428
@property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
1429
+ - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
1380
1430
- (void)loadMessageForAuthId:(NSString * _Nullable)authId;
1381
1431
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
1382
1432
@end
1383
1433
1384
- @class SPPropertyName;
1385
- enum SPMessageLanguage : NSInteger;
1386
1434
1387
- SWIFT_CLASS("_TtC21ConsentViewController16SPConsentManager")
1388
- @interface SPConsentManager : NSObject <SPSDK>
1435
+ @interface SPConsentManager (SWIFT_EXTENSION(ConsentViewController)) <SPSDK>
1389
1436
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull VERSION;)
1390
1437
+ (NSString * _Nonnull)VERSION SWIFT_WARN_UNUSED_RESULT;
1391
- SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL shouldCallErrorMetrics;)
1392
- + (BOOL)shouldCallErrorMetrics SWIFT_WARN_UNUSED_RESULT;
1393
- + (void)setShouldCallErrorMetrics:(BOOL)value;
1394
- @property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
1395
1438
+ (void)clearAllData;
1396
- /// The timeout interval in seconds for the message being displayed
1397
- @property (nonatomic) NSTimeInterval messageTimeoutInSeconds;
1398
- - (nonnull instancetype)initWithAccountId:(NSInteger)accountId propertyName:(SPPropertyName * _Nonnull)propertyName campaignsEnv:(enum SPCampaignEnv)campaignsEnv campaigns:(SPCampaigns * _Nonnull)campaigns delegate:(id <SPDelegate> _Nullable)delegate;
1399
- /// Instructs the privacy manager to be displayed with this tab.
1400
- /// By default the SDK will use the defult tab of PM
1401
- @property (nonatomic) enum SPPrivacyManagerTab privacyManagerTab;
1402
- /// Instructs the message to be displayed in this language. If the translation is missing, the fallback will be English.
1403
- /// By default the SDK will use the locale defined by the WebView
1404
- @property (nonatomic) enum SPMessageLanguage messageLanguage;
1439
+ @property (nonatomic, readonly) BOOL gdprApplies;
1440
+ @property (nonatomic, readonly) BOOL ccpaApplies;
1441
+ @property (nonatomic, readonly, strong) SPUserData * _Nonnull userData;
1405
1442
- (void)loadMessageForAuthId:(NSString * _Nullable)authId;
1406
1443
- (void)loadGDPRPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
1407
1444
- (void)loadCCPAPrivacyManagerWithId:(NSString * _Nonnull)id tab:(enum SPPrivacyManagerTab)tab;
1408
- - (BOOL)gdprApplies SWIFT_WARN_UNUSED_RESULT;
1409
- - (BOOL)ccpaApplies SWIFT_WARN_UNUSED_RESULT;
1410
1445
- (void)customConsentGDPRWithVendors:(NSArray<NSString *> * _Nonnull)vendors categories:(NSArray<NSString *> * _Nonnull)categories legIntCategories:(NSArray<NSString *> * _Nonnull)legIntCategories handler:(void (^ _Nonnull)(SPGDPRConsent * _Nonnull))handler;
1411
- - (void)onError:(SPError * _Nonnull)error;
1412
- - (nonnull instancetype)init SWIFT_UNAVAILABLE;
1413
- + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
1414
1446
@end
1415
1447
1416
1448
1417
-
1418
-
1419
1449
SWIFT_PROTOCOL("_TtP21ConsentViewController19SPConsentUIDelegate_")
1420
1450
@protocol SPConsentUIDelegate
1421
1451
/// called when the user takes an action in the SP UI
0 commit comments