You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple escaping completion handler would suffice.
This would be useful if I want the app to send one signal per day at most, while making sure that the signal was received by the server before blocking further attempts.
`
if lastSignalSentDate != today {
TelemetryManager.send("appUsed")
//If the above line fails due to poor internet or an offline launch of the app, we have no way of knowing.
lastSignalSentDate = today
}
`
Purposed solution
`
if lastSignalSentDate != today {
TelemetryManager.send("appUsed") { didFail in
if !didFail {
lastSignalSentDate = today
}
}
}
`
The text was updated successfully, but these errors were encountered:
A simple escaping completion handler would suffice.
This would be useful if I want the app to send one signal per day at most, while making sure that the signal was received by the server before blocking further attempts.
`
`
Purposed solution
`
`
The text was updated successfully, but these errors were encountered: