My app has the App Sandbox enabled and the File Access to Downloads folder is set to Read / Write in XCode.
Upon clicking on a button the app should open the Finder displaying the Downloads folder. The following code snippet is used to launch the Finder
if let inspirationsDirectory = FileManager.default.urls(for: .downloadsDirectory, in: .userDomainMask).first{
NSWorkspace.shared.open(inspirationsDirectory)
}
On my MacOS it works well.
After releasing the app to the AppStore and installing it on another Mac the following message is received upon clicking the button:
The application does not have permission to open "Downloads"
Which would be the solution to launch the Finder successfully ? Is it possible to launch the Finder showing the Downloads folder sorted by the Date Added column descending ?