mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-05-06 21:35:18 +00:00
COVIDSafe code from version 1.10
This commit is contained in:
parent
3b1d8fa3f4
commit
9d9164c615
37 changed files with 2681 additions and 328 deletions
|
@ -102,7 +102,7 @@ final class InfoViewController: UIViewController {
|
|||
|
||||
@objc
|
||||
func clearLogsButtonClicked() {
|
||||
guard let persistentContainer =
|
||||
guard let persistentContainer =
|
||||
EncounterDB.shared.persistentContainer else {
|
||||
return
|
||||
}
|
||||
|
@ -119,14 +119,19 @@ final class InfoViewController: UIViewController {
|
|||
print("Could not perform delete. \(error)")
|
||||
}
|
||||
|
||||
guard let logPersistentContainer =
|
||||
BLELogDB.shared.persistentContainer else {
|
||||
return
|
||||
}
|
||||
let logManagedContext = logPersistentContainer.viewContext
|
||||
let logFetchRequest = NSFetchRequest<BLELog>(entityName: "BLELog")
|
||||
logFetchRequest.includesPropertyValues = false
|
||||
do {
|
||||
let logs = try managedContext.fetch(logFetchRequest)
|
||||
let logs = try logManagedContext.fetch(logFetchRequest)
|
||||
for bleLog in logs {
|
||||
managedContext.delete(bleLog)
|
||||
logManagedContext.delete(bleLog)
|
||||
}
|
||||
try managedContext.save()
|
||||
try logManagedContext.save()
|
||||
} catch {
|
||||
print("Could not perform delete. \(error)")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue