TelemetryDeck / SwiftSDK

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

Signals not being sent in when SignalManager.init called from a background queue #147

Open winsmith opened 6 months ago

winsmith commented 6 months ago

Found an interesting issue in Swift Client 1.5.1: our signals did not get send from Simulator and debugging showed that the timer scheduled in SignalManager.swift:64 did not fire.

SignalManager.init was called from a background queue. Making the calling code a MainActor fixed it. Assumption is that the timer gets removed when the task on the queue finishes.

Did not further investigate but maybe you want to have a look.