From 49940e266b038dbcedee8e04ee2fe2f4061763aa Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Thu, 31 Oct 2024 10:31:28 -0600 Subject: [PATCH 1/2] renames to enableAnonActivation --- swift-sdk/Internal/InternalIterableAPI.swift | 16 ++-- swift-sdk/IterableConfig.swift | 2 +- ...ataTypeComparatorSearchQueryCriteria.swift | 88 ++++++++++++++----- .../unit-tests/UserMergeScenariosTests.swift | 40 ++++----- ...ValidateCustomEventUserUpdateAPITest.swift | 2 +- ...oredEventCheckUnknownToKnownUserTest.swift | 2 +- .../ValidateTokenForDestinationUserTest.swift | 4 +- 7 files changed, 97 insertions(+), 57 deletions(-) diff --git a/swift-sdk/Internal/InternalIterableAPI.swift b/swift-sdk/Internal/InternalIterableAPI.swift index 9b3a8ae32..f86fda14c 100644 --- a/swift-sdk/Internal/InternalIterableAPI.swift +++ b/swift-sdk/Internal/InternalIterableAPI.swift @@ -153,7 +153,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { } let merge = identityResolution?.mergeOnAnonymousToKnown ?? config.identityResolution.mergeOnAnonymousToKnown let replay = identityResolution?.replayOnVisitorToKnown ?? config.identityResolution.replayOnVisitorToKnown - if config.enableAnonTracking, let email = email { + if config.enableAnonActivation, let email = email { self?.attemptAndProcessMerge( merge: merge ?? true, replay: replay ?? true, @@ -192,7 +192,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { guard let config = self?.config else { return } - if config.enableAnonTracking { + if config.enableAnonActivation { if let userId = userId, userId != (self?.localStorage.userIdAnnon ?? "") { let merge = identityResolution?.mergeOnAnonymousToKnown ?? config.identityResolution.mergeOnAnonymousToKnown let replay = identityResolution?.replayOnVisitorToKnown ?? config.identityResolution.replayOnVisitorToKnown @@ -242,7 +242,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { self.localStorage.anonymousUserUpdate = nil self.localStorage.userIdAnnon = nil - if isAnonymousUsageTracked && config.enableAnonTracking { + if isAnonymousUsageTracked && config.enableAnonActivation { ITBInfo("CONSENT GIVEN and ANON TRACKING ENABLED - Criteria fetched") self.anonymousUserManager.getAnonCriteria() self.anonymousUserManager.updateAnonSession() @@ -268,7 +268,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { } if !isEitherUserIdOrEmailSet() && localStorage.userIdAnnon == nil { - if config.enableAnonTracking { + if config.enableAnonActivation { anonymousUserManager.trackAnonTokenRegistration(token: token.hexString()) } onFailure?("Iterable SDK must be initialized with an API key and user email/userId before calling SDK methods", nil) @@ -330,7 +330,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { onSuccess: OnSuccessHandler? = nil, onFailure: OnFailureHandler? = nil) -> Pending { if !isEitherUserIdOrEmailSet() && localStorage.userIdAnnon == nil { - if config.enableAnonTracking { + if config.enableAnonActivation { ITBInfo("AUT ENABLED - anon update user") anonymousUserManager.trackAnonUpdateUser(dataFields) } @@ -362,7 +362,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { onSuccess: OnSuccessHandler? = nil, onFailure: OnFailureHandler? = nil) -> Pending { if !isEitherUserIdOrEmailSet() && localStorage.userIdAnnon == nil { - if config.enableAnonTracking { + if config.enableAnonActivation { ITBInfo("AUT ENABLED - anon update cart") anonymousUserManager.trackAnonUpdateCart(items: items) } @@ -395,7 +395,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { onSuccess: OnSuccessHandler? = nil, onFailure: OnFailureHandler? = nil) -> Pending { if !isEitherUserIdOrEmailSet() { - if config.enableAnonTracking { + if config.enableAnonActivation { ITBInfo("AUT ENABLED - anon track purchase") anonymousUserManager.trackAnonPurchaseEvent(total: total, items: items, dataFields: dataFields) } @@ -469,7 +469,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider { onSuccess: OnSuccessHandler? = nil, onFailure: OnFailureHandler? = nil) -> Pending { if !isEitherUserIdOrEmailSet() && localStorage.userIdAnnon == nil { - if config.enableAnonTracking { + if config.enableAnonActivation { ITBInfo("AUT ENABLED - anon track custom event") anonymousUserManager.trackAnonEvent(name: eventName, dataFields: dataFields) } diff --git a/swift-sdk/IterableConfig.swift b/swift-sdk/IterableConfig.swift index 952fcafc3..9659ebd35 100644 --- a/swift-sdk/IterableConfig.swift +++ b/swift-sdk/IterableConfig.swift @@ -141,7 +141,7 @@ public class IterableConfig: NSObject { public var dataRegion: String = IterableDataRegion.US /// When set to `true`, IterableSDK will track all events when users are not logged into the application. - public var enableAnonTracking = true + public var enableAnonActivation = true /// Allows for fetching embedded messages. public var enableEmbeddedMessaging = false diff --git a/tests/unit-tests/DataTypeComparatorSearchQueryCriteria.swift b/tests/unit-tests/DataTypeComparatorSearchQueryCriteria.swift index e5ce24026..29940b70e 100644 --- a/tests/unit-tests/DataTypeComparatorSearchQueryCriteria.swift +++ b/tests/unit-tests/DataTypeComparatorSearchQueryCriteria.swift @@ -83,9 +83,12 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataEqualSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 19.99, "eventTimeStamp": 3, - "likes_boba": true, - "country":"Chaina"]]] + "dataFields":[ + "savings": 19.99, + "eventTimeStamp": 3, + "likes_boba": true, + "country":"Chaina"] + ]] let expectedCriteriaId = "285" @@ -98,9 +101,12 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { //let eventItems: [[AnyHashable: Any]] = [["dataType":"user","savings": 10.1]] let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 10.99, "eventTimeStamp": 30, - "likes_boba": false, - "country":"Taiwan"]]] + "dataFields":[ + "savings": 10.99, + "eventTimeStamp": 30, + "likes_boba": false, + "country":"Taiwan"] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) @@ -164,8 +170,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataDoesNotEqualSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 11.2, "eventTimeStamp": 30, - "likes_boba": false] + "dataFields":[ + "savings": 11.2, + "eventTimeStamp": 30, + "likes_boba": false] ]] let expectedCriteriaId = "285" @@ -176,8 +184,11 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataDoesNotEqualFailed() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 19.99, "eventTimeStamp": 30, - "likes_boba": true]]] + "dataFields":[ + "savings": 19.99, + "eventTimeStamp": 30, + "likes_boba": true] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataDoesNotEquals)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } @@ -271,7 +282,9 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataLessThanSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 10, "eventTimeStamp": 14] + "dataFields":[ + "savings": 10, + "eventTimeStamp": 14] ]] let expectedCriteriaId = "289" @@ -282,7 +295,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataLessThanFailed() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 18, "eventTimeStamp": 18]]] + "dataFields":[ + "savings": 18, + "eventTimeStamp": 18] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataLessThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } @@ -290,7 +306,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataLessThanOrEqualSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 17, "eventTimeStamp": 14]]] + "dataFields":[ + "savings": 17, + "eventTimeStamp": 14] + ]] let expectedCriteriaId = "290" let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataLessThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() @@ -300,7 +319,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataLessThanOrEqualFailed() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 18, "eventTimeStamp": 12]]] + "dataFields":[ + "savings": 18, + "eventTimeStamp": 12] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataLessThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } @@ -394,7 +416,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataGreaterThanSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 56, "eventTimeStamp": 51]]] + "dataFields":[ + "savings": 56, + "eventTimeStamp": 51] + ]] let expectedCriteriaId = "290" let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataGreaterThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() @@ -404,7 +429,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataGreaterThanFailed() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 5, "eventTimeStamp": 3]]] + "dataFields":[ + "savings": 5, + "eventTimeStamp": 3] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataGreaterThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } @@ -412,7 +440,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataGreaterThanOrEqualSuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType": "user", - "dataFields":["savings": 20, "eventTimeStamp": 30]]] + "dataFields":[ + "savings": 20, + "eventTimeStamp": 30] + ]] let expectedCriteriaId = "291" let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataGreaterThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, expectedCriteriaId) @@ -420,7 +451,10 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataGreaterThanOrEqualFailed() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 18, "eventTimeStamp":16]]] + "dataFields":[ + "savings": 18, + "eventTimeStamp":16] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataGreaterThanOrEqual)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } @@ -489,9 +523,12 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataIsSetySuccess() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": 10, "eventTimeStamp":20, - "saved_cars":"10", - "country": "Taiwan"]]] + "dataFields":[ + "savings": 10, + "eventTimeStamp":20, + "saved_cars":"10", + "country": "Taiwan"] + ]] let expectedCriteriaId = "285" let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataIsSet)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, expectedCriteriaId) @@ -499,9 +536,12 @@ final class DataTypeComparatorSearchQueryCriteria: XCTestCase { func testCompareDataIsSetFailure() { let eventItems: [[AnyHashable: Any]] = [["dataType":"user", - "dataFields":["savings": "", "eventTimeStamp":"", - "saved_cars":"", - "country": ""]]] + "dataFields":[ + "savings": "", + "eventTimeStamp":"", + "saved_cars":"", + "country": ""] + ]] let matchedCriteriaId = CriteriaCompletionChecker(anonymousCriteria: data(from: mockDataIsSet)!, anonymousEvents: eventItems).getMatchedCriteria() XCTAssertEqual(matchedCriteriaId, nil) } diff --git a/tests/unit-tests/UserMergeScenariosTests.swift b/tests/unit-tests/UserMergeScenariosTests.swift index 057499b44..cf420e7fb 100644 --- a/tests/unit-tests/UserMergeScenariosTests.swift +++ b/tests/unit-tests/UserMergeScenariosTests.swift @@ -85,7 +85,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetUserIdDefault() { // criteria not met with merge default with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -130,7 +130,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetUserIdReplayTrueMergeFalse() { // criteria not met with merge false with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -175,7 +175,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetUserIdReplayFalseMergeFalse() { // criteria not met with merge true with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -223,7 +223,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetUserIdReplayFalseMergeTrue() { // criteria not met with merge true with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -271,7 +271,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetUserIdDefault() { // criteria met with merge default with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -307,7 +307,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetUserIdMergeFalse() { // criteria met with merge false with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -343,7 +343,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetUserIdMergeTrue() { // criteria met with merge true with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -382,7 +382,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedUserIdDefault() { // current user identified with setUserId default let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -432,7 +432,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedUserIdMergeFalse() { // current user identified with setUserId merge false let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -483,7 +483,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedUserIdMergeTrue() { // current user identified with setUserId true let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -535,7 +535,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetEmailDefault() { // criteria not met with merge default with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -580,7 +580,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetEmailReplayTrueMergeFalse() { // criteria not met with merge false with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -624,7 +624,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetEmailReplayFalseMergeFalse() { // criteria not met with merge true with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -670,7 +670,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaNotMetEmailReplayFalseMergeTrue() { // criteria not met with merge true with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -716,7 +716,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetEmailDefault() { // criteria met with merge default with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -751,7 +751,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetEmailMergeFalse() { // criteria met with merge false with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -786,7 +786,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testCriteriaMetEmailMergeTrue() { // criteria met with merge true with setEmail let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -822,7 +822,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedEmailDefault() { // current user identified with setEmail default let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -870,7 +870,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedEmailMergeFalse() { // current user identified with setEmail merge false let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, @@ -920,7 +920,7 @@ class UserMergeScenariosTests: XCTestCase, AuthProvider { func testIdentifiedEmailMergeTrue() { // current user identified with setEmail true let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: UserMergeScenariosTests.apiKey, config: config, networkSession: mockSession, diff --git a/tests/unit-tests/ValidateCustomEventUserUpdateAPITest.swift b/tests/unit-tests/ValidateCustomEventUserUpdateAPITest.swift index 643fddc62..0a270885a 100644 --- a/tests/unit-tests/ValidateCustomEventUserUpdateAPITest.swift +++ b/tests/unit-tests/ValidateCustomEventUserUpdateAPITest.swift @@ -105,7 +105,7 @@ final class ValidateCustomEventUserUpdateAPITest: XCTestCase, AuthProvider { func testCriteriaCustomEventCheck() { // criteria not met with merge false with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: ValidateCustomEventUserUpdateAPITest.apiKey, config: config, networkSession: mockSession, diff --git a/tests/unit-tests/ValidateStoredEventCheckUnknownToKnownUserTest.swift b/tests/unit-tests/ValidateStoredEventCheckUnknownToKnownUserTest.swift index 4dea30d20..608018d09 100644 --- a/tests/unit-tests/ValidateStoredEventCheckUnknownToKnownUserTest.swift +++ b/tests/unit-tests/ValidateStoredEventCheckUnknownToKnownUserTest.swift @@ -44,7 +44,7 @@ final class ValidateStoredEventCheckUnknownToKnownUserTest: XCTestCase, AuthProv func testCriteriaCustomEventCheck() { // criteria not met with merge false with setUserId let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true IterableAPI.initializeForTesting(apiKey: ValidateStoredEventCheckUnknownToKnownUserTest.apiKey, config: config, networkSession: mockSession, diff --git a/tests/unit-tests/ValidateTokenForDestinationUserTest.swift b/tests/unit-tests/ValidateTokenForDestinationUserTest.swift index 4bb33cfc7..d4cb11d23 100644 --- a/tests/unit-tests/ValidateTokenForDestinationUserTest.swift +++ b/tests/unit-tests/ValidateTokenForDestinationUserTest.swift @@ -138,7 +138,7 @@ final class ValidateTokenForDestinationUserTest: XCTestCase { }) let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true config.authDelegate = authDelegate IterableAPI.initializeForTesting(apiKey: ValidateTokenForDestinationUserTest.apiKey, config: config, @@ -242,7 +242,7 @@ final class ValidateTokenForDestinationUserTest: XCTestCase { }) let config = IterableConfig() - config.enableAnonTracking = true + config.enableAnonActivation = true config.authDelegate = authDelegate IterableAPI.initializeForTesting(apiKey: ValidateTokenForDestinationUserTest.apiKey, config: config, From 9e059938db583b8d17ee4156d92a1d6a0a6b448b Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Thu, 31 Oct 2024 10:41:42 -0600 Subject: [PATCH 2/2] remaning --- swift-sdk/IterableAPI.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-sdk/IterableAPI.swift b/swift-sdk/IterableAPI.swift index 76f81e038..df98fc002 100644 --- a/swift-sdk/IterableAPI.swift +++ b/swift-sdk/IterableAPI.swift @@ -126,7 +126,7 @@ import UIKit callback?(false) } - if let implementation, config.enableAnonTracking, !implementation.isSDKInitialized(), implementation.getVisitorUsageTracked() { + if let implementation, config.enableAnonActivation, !implementation.isSDKInitialized(), implementation.getVisitorUsageTracked() { ITBInfo("AUT ENABLED AND CONSENT GIVEN - Criteria fetched") implementation.anonymousUserManager.getAnonCriteria() implementation.anonymousUserManager.updateAnonSession()