I am having big trouble with an app for macOS Big Sur. I want to issue that app to the App Store, therefore, I have to enable sandboxing. But that breaks the save functionality: I want to save a text file to a location selected by the user. Therefore, I call chooser.browseForFileToSave(true), the file dialog pops up I can enter a file name but when I do this:
I get an “Operation not permitted” error from output.getStatus().getErrorMessage()
It is clearly caused by the sandboxing. If I turn it off it works perfectly.
I tried already to change entitlements and added:
com.apple.security.files.user-selected.read-write = true
com.apple.security.temporary-exception.files.home-relative-path.read-write = true
com.apple.security.temporary-exception.files.absolute-path.read-write = true
But nothing solved it. If have spent two days with searching on the internet without success. The only hint I could find was something like use NSSavePanel. Harharhar, you would expect that the JUCE framework takes care of this… And actually I think it does, doesn’t it?
So any idea? Help would be really appreciated.