TelemetryDeck / SwiftSDK

Swift SDK for TelemetryDeck, a privacy-conscious analytics service for apps and websites.
https://telemetrydeck.com/
Other
149 stars 31 forks source link

Provide Delegate Support for default user and payload #30

Closed winsmith closed 2 years ago

winsmith commented 3 years ago

Provide a TelemetryManagerDelegate protocol with methods that return a default user identifier string and a default payload.

Every time TelemetryManager.send is called, the method queries wether a delegate is present and what it has to say about default user and payload, mixing in first the built-in payload, then the delegates payload, then the provided payload at method call.

This way, developers do not have to provide these data over and over again, leading to repetition and errors.