Skip to content

Commit 196d443

Browse files
author
Evan Greer
committed
clears local storage when replay is false
1 parent a2579be commit 196d443

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

swift-sdk/Internal/AnonymousUserManager.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ public class AnonymousUserManager: AnonymousUserManagerProtocol {
167167

168168
IterableAPI.implementation?.updateUser(userUpdate, mergeNestedObjects: false)
169169
}
170-
171-
clearVisitorEventsAndUserData()
172170
}
173171

174172
public func clearVisitorEventsAndUserData() {

swift-sdk/Internal/AnonymousUserManagerProtocol.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ import Foundation
1414
func updateAnonSession()
1515
func getAnonCriteria()
1616
func syncEvents()
17+
func clearVisitorEventsAndUserData()
1718
}

swift-sdk/Internal/InternalIterableAPI.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
231231
} else {
232232
failureHandler?(error, nil)
233233
}
234+
self.anonymousUserManager.clearVisitorEventsAndUserData()
234235
}
235236
}
236237

0 commit comments

Comments
 (0)