Skip to content

Commit 75d2a2c

Browse files
committed
fix: is_identified fallback value
1 parent 05881a3 commit 75d2a2c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Next
22

3+
- fix: wrong is_identified fallback value ([#317](https://github.com/PostHog/posthog-ios/pull/317))
4+
35
## 3.20.0 - 2025-03-04
46

57
- feat: support multiple SDK instances ([#310](https://github.com/PostHog/posthog-ios/pull/310))

PostHog/PostHogStorageManager.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class PostHogStorageManager {
9595
public func isIdentified() -> Bool {
9696
identifiedLock.withLock {
9797
if isIdentifiedValue == nil {
98-
isIdentifiedValue = storage.getBool(forKey: .isIdentified) ?? (getDistinctId() != getDistinctId())
98+
isIdentifiedValue = storage.getBool(forKey: .isIdentified) ?? (getDistinctId() != getAnonymousId())
9999
}
100100
}
101101
return isIdentifiedValue ?? false

0 commit comments

Comments
 (0)