Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get 'hashedDefaultUser' working even without a custom user set #214

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

Jeehut
Copy link
Contributor

@Jeehut Jeehut commented Dec 2, 2024

This fixes #190.

But please note that this adds a @MainActor requirement to the hashedDefaultUser because accessing the identifierForVendor on iOS needs access to UIDevice.current, which is only accessible on the main thread. Technically speaking, this is a breaking change, as users who migrated to Swift 6 may no longer be able to access hashedDefaultUser from a background thread without adding concurrency to their code.

Having that said, since the original PR states that this field was added to report the user ID to other systems, that kind of code should be done in concurrent contexts anyways and therefore for most users the fix would be as simple as adding the await keyword.

@winsmith
Copy link
Contributor

winsmith commented Dec 2, 2024

yes lets totally go for it here

@Jeehut Jeehut merged commit 359a1df into main Dec 2, 2024
6 checks passed
@Jeehut Jeehut deleted the feature/default-hashed-user branch December 2, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a reason why hashedDefaultUser doesn't hash the "default" user that TelemetryDeck uses
2 participants