I would like to give Desktop Access to my app using this pop up on launch for the first time exactly like Bridge does.
Do I need Privileged File Operation entitlement or is there a way to get around this without paying to become an apple developer?
I'm not planning on releasing my app on the Mac app store but it does need to be sandboxed due to using finder sync.
func applicationDidFinishLaunching(_ aNotification: Notification) {
let url = URL(fileURLWithPath: "/Users/useraccount/Desktop/", isDirectory: true)
let configuration: NSWorkspace.OpenConfiguration = NSWorkspace.OpenConfiguration()
configuration.promptsUserIfNeeded = true
let finder = NSWorkspace.shared.urlForApplication(withBundleIdentifier: "com.apple.finder")
NSWorkspace.shared.open([url], withApplicationAt: finder!, configuration: configuration)
}
This code only makes this pop up appear
Any help much appreciated.