How to check if sandboxing is enabled or not at OSX app runtime?
I need it for some assert tests for my library that can be run in different environments.
Finally I have chosen this workaround (because it is simple):
func isSandboxingEnabled() -> Bool {
let environment = NSProcessInfo.processInfo().environment
return environment["APP_SANDBOX_CONTAINER_ID"] != nil
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With