I am using the new Unified Logging API in Swift.
So I create a logger and use it as below:
let testLogger = OSLog(subsystem: "my.subsystem", category: "test")
os_log("just a test: %@", log: testLogger, type: .error, "error")
How can I retrieve the logged message if the iOS device is disconnected from the Mac?
I know that the new Console application shows messages logged when the device is connected to the Mac. However, I want to retrieve a message that was logged when the device was disconnected from the computer. How can I achieve that?
Thank you.
os_log
, however Apple might releaseOSLogStore
to achieve this. They almost did during the iOS 14 beta phase, but then removed it again before the GM: doesoslogstoreworkyet.com – Hadrian