Comments (3)
I totally agree with your suggestion!
from swiftclient.
Alright, then expect a PR from me with my above outlined solution sometime soon.
from swiftclient.
@winsmith I just noticed this warning in my console for my macOS app:
[Telemetry] On this platform, Telemetry can't generate a unique user identifier. It is recommended you supply one yourself. More info: https://telemetrydeck.com/pages/signal-reference.html
From this code I derived that you're using identifierForVendor
to retrieve a unique ID for the user on other platforms. From what I understand, this ID provided by Apple behaves very much like a self-generated UUID()
on first app start that was persisted somewhere accessible by the app. The only 2 differences to a self-generated UUID
are:
- Apples
UUID
is the same for all apps of the same vendor on the same device. - The system takes care of persisting this
UUID
on behalf of the developer.
As such a thing is not available on macOS, I believe the closest thing to that would be a self-generated UUID
based on nothing (no deviceName or system version needed). This UUID needs to be persisted and to not meddle with the developers data, I suggest using the UserDefaults with a custom suiteName such as TelemetryDeck
for that. This way TelemetryDeck could take care of persisting the default identifier on behalf of the developer. Overriding it of course should still be possible and developer who followed the warning and have overridden it should not see any effect of this default ID change.
The last difference to identifierForVendor
would then be that multiple apps of the same vendor on the same device would still have different unique identifiers. I suggest that this is covered by providing a hook the developer can opt-in to by passing the user defaults object of their app group if they really want this behavior. By default, this would be the only difference to identifierForVendor
.
The solution you suggest in my opinion is not safe to be unique. Two users with the same system and build version, and with the same name (e.g. "Daniel") and device could easily end up having the same identifier which could lead to a lot of confusion when tracking funnels, for example. I think, a persisted UUID
is a better default here.
As I need this right now, I would be up to implement it like outlined above if you agree with my suggestion.
from swiftclient.
Related Issues (20)
- Add Privacy Labels for Swift SDK
- VisionOS: Use identifierForVendor
- Is First Run On Device
- LogHandler Initialiser Not Public HOT 3
- Time active
- Add support for CocoaPods
- Add a completion handler to TelemetryManager.send()
- Force-sending signals from cache when app enters background / terminated
- Use OSLog when available for structured logging features of Xcode 15
- Privacy manifest file - no nutrition label shown at App Store (SwiftClient 1.5.0) HOT 2
- SwiftUI Previews log "Containers/dev.fline.StringCatalogTranslator/Data/Library/Caches/telemetrysignalcache" many times
- SignalCache can perform FileIO on the main thread.
- HSTS for main (null) in visionOS
- SignalManager: Data race detected by Thread Sanitizer in `func processSignal`
- SDK: prevent users from using โcountโ in signals
- Record Average Session Length
- New Users Signal
- Crash Reporting: Collect crashes and Metrics in SDK and send to API HOT 1
- SDK: Double check majorminorSystemVersion and majorMinorSystemVersion if they contain all data
- SDK: Privacy manifest not honoured?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftclient.