Jump to content
Sign in to follow this  
Eric58

How to get TOpenDialog on sandboxed MacOS app to work

Recommended Posts

Has anyone solved the problem of getting TOpenDialog on a MacOS application that is sandboxed to work?  Sandboxed means the application build type is set to "Application Store" as opposed to setting it to "Normal" or "Developer ID".

 

On MacOS, TOpenDialog is ultimately implemented as NSOpenPanel (which is MacOS's native method for letting the user select a file from the file system), and it works fine as long as my application is deployed as a Normal build.  But the minute I set the build type to Application Store, the generated entitlements file will include a sandbox key with value set to true (as it should), making the application a sandboxed app, and that’s when TOpenDialog fails to run.

 

Hope someone out there has a solution for this problem.

Share this post


Link to post

Problem solved, after a bit of googling.

 

Need to set the following item in the Entitlements List of Project Options to true for sandbox applications using TOpenDialog:

  "Read/write access to files selected with the Open or Save" 

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×