This repository was archived by the owner on May 29, 2021. It is now read-only.

Description
I may be missing something here that is not obvious from the code, but I only see two functions that deal with the $PINGTYPE-dailyUploadCount value in Storage:
The first retrieves the value:
private func dailyUploadCountForPingType(_ pingType: String) -> Int {
return storage.get(valueFor: "\(pingType)-dailyUploadCount") as? Int ?? 0
}
The second increments the value:
private func incrementDailyUploadCountForPingType(_ pingType: String) {
let dailyUploadCount = dailyUploadCountForPingType(pingType) + 1
storage.set(key: "\(pingType)-dailyUploadCount", value: dailyUploadCount)
let lastUploadTimestamp = Date().timeIntervalSince1970
storage.set(key: "\(pingType)-lastUploadTimestamp", value: lastUploadTimestamp)
}
Where is the code that resets or decrements this counter?
What happens when this counter reaches MaxNumberOfPingUploadsPerDay (100)?