{"message":"This code path does I/O on the main thread underneath that can lead to UI responsiveness issues. Consider ways to optimize this code path","antipattern trigger":"-[NSData initWithContentsOfURL:options:error:]","message type":"suppressable","show in console":"0"}
Code:
extension LoggerStore {
private struct Manifest: Codable {
var storeId: UUID
var version: Version
var lastSweepDate: Date?
init(storeId: UUID, version: Version) {
self.storeId = storeId
self.version = version
}
init?(url: URL) {
guard let data = try? Data(contentsOf: url),
let manifest = try? JSONDecoder().decode(Manifest.self, from: data) else {
return nil
}
self = manifest
}
}
}
Xcode version: 15.3 Pulse version: 4.0.5
Error:
Code: