'Swift boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics
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()
}
Solution 1:[1]
Try executing this command in Terminal:
xcrun simctl spawn booted log config --subsystem com.apple.network --category boringssl --mode "level:off"
It should turn off these annoying console logs.
Note - if you switch to another iOS Simulator, you have to repeat this command again.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |