Hi folks,
For accessing the logs, I’m using OSLogStore object. I want to be able to read logs from any previous run of my application.
I can of course do this:
// Open the log store.
var logStore = try OSLogStore(scope: .currentProcessIdentifier)
But this only allows me to retrieve logs from my current running process.
I can also do this:
// Open the log store.
var logStore = try OSLogStore(scope: .system)
But this only works if my App Sandbox entitlement is false. I tried disabling the sandbox, and I was able to get to all the logs (which is good) but according to this page:
https://developer.apple.com/documentation/security/app_sandbox/
it says: To distribute a macOS app through the Mac App Store, you must enable the App Sandbox capability
Since we are planning on distributing our app on the store, this presents a big problem for me.
(I didn't try submitting to TestFlight to see if it's really the case). I don’t know if there are exclusions or ways around this – I don’t see an entitlement that I can add which would allow access to the logs.
Does anyone know a way around this?
Thanks,
David