You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support easy debugging of json responses too like this:
do {
// Attempt to deserialize the Data object to a JSON object
let jsonObject = try JSONSerialization.jsonObject(with: data, options: [])
// Convert the JSON object to a pretty-printed string
let decodedJsonData = try JSONSerialization.data(withJSONObject: jsonObject, options: [.prettyPrinted])
DebugLog.shared.log(String(data: decodedJsonData, encoding: .utf8) ?? "")
} catch {
print("Error converting Data to JSON decoded string: \(error)")
}
Replace my current debug logging with the proper API
https://developer.apple.com/documentation/os/logging
The text was updated successfully, but these errors were encountered: