Sandbox extension creation failed when calling NSWorkspace.shared.activateFileViewerSelecting

Hello! I get a sandbox entitlements error message when calling

NSWorkspace.shared.activateFileViewerSelecting(anUrl)

"Sandbox extension creation failed: client lacks entitlements? for path: ..."

The function succeeds but that might be just my machine and I don't know how it will behave on another machine. What I'd like is for Finder to open the file location, so I thought the file entitlements wouldn't apply to my app. For my app it doesn't make sense for a user to open the location first using an open dialog, and the locations are not one of the standard file access choices (eg Downloads, Pictures, etc).

Any ideas? Thanks!

Answered by DTS Engineer in 698081022

The ability to reveal things in the Finder, using either activateFileViewerSelecting(…) or its predecessor, is not restricted by the App Sandbox. Given that things are working, I’d consider that message to be log noise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

The ability to reveal things in the Finder, using either activateFileViewerSelecting(…) or its predecessor, is not restricted by the App Sandbox. Given that things are working, I’d consider that message to be log noise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks Quinn, appreciate the response. I'll leave it in and cross my fingers for app review. 🙂🤞

Sandbox extension creation failed when calling NSWorkspace.shared.activateFileViewerSelecting
 
 
Q