I just get an error "[boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics" while to get JSON data from API link. Before it worked and I just updated Xcode version 13.1. I was checking every forum but I couldn't find a way to solve it. Anyone had the same problem before, please help me. Thank you.
func parse() {
let jsonUrlString = "https://api.tiki.vn/shopping-trend/api/trendings/hub?cursor=0&limit=20"
guard let url = URL(string: jsonUrlString)
else {
return
}
URLSession.shared.dataTask(with: url) { [self]
data, response, err in
if err != nil {
print(err as Any)
return
}
do {
let result = try JSONDecoder().decode(Data.self, from: data!)
DispatchQueue.main.async {
self.items = (result.data?.data)!
print(items)
}
} catch {
print("Error")
}
}
.resume()
}