How to avoid "Application would like to access files on network volume" prompt on macOS?

So here is my situation. I am developing a macOS app which includes a helper tool. Helper mounts a FS (served locally from the app) under /Volumes/myfilesystem. Once this happens I would like the main app to programmaticaly open a finder window on the root of this filesystem.

I'm currently trying to do this like that:
Code Block
let conf = NSWorkspace.OpenConfiguration()
conf.createsNewApplicationInstance = false
conf.addsToRecentItems = false
conf.promptsUserIfNeeded = false
NSWorkspace.shared.open([url],
withApplicationAt: URL(fileURLWithPath: "/System/Library/CoreServices/Finder.app"),
configuration: conf)

Unfortunately this causes the interactive security prompt to popup for the user (even though I "disallow" the access the Finder window correctly opens on the given directroy). Is there a way to avoid this popup (I don't want to "access" this directory" from my app, I just need it to open it in Finder)?

Once this happens I would like the main app to programmaticaly open a
finder window on the root of this filesystem.

Have you tried using activateFileViewerSelecting(_:)?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
It does a bit different thing: it opens up the finder window on a location containing my mounted file system and selects the volume icon of the mounted volume. What I want is to open a finder window showing the root of my mounted file system instead.

It does a bit different thing

Ah, yes.

Is your app sandboxed?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
How to avoid "Application would like to access files on network volume" prompt on macOS?
 
 
Q