There seems to be a problem with the TOpenDialog in a Firemonkey application, which is sandboxed for the Mac Appstore. I use XE3, but it is also present in XE2. I actually found a QC report here, but it is still unresolved:
http://qc.embarcadero.com/wc/qcmain.aspx?d=105344
Has anyone had the same problem, or any ideas how to work around it?
It is very easy to check. Just put a TOpenDialog on a form and call the Execute method. Sign and sandbox the application according to the Embarcadero instructions:
http://docwiki.embarcadero.com/RADStudio/en/Mac_OS_X_Application_Development
When Execute is called there is a delay, the app freezes for a moment, but nothing is shown. There are no exceptions or error messages. If the app is not sandboxed the dialog works properly.
This code also does not work, so the problem is probably somewhere in the TNSOpenPanel, which is called by the TOpenDialog, but unfortunately I could not find it.
var
LOpenDir: NSOpenPanel;
begin
LOpenDir := TNSOpenPanel.Wrap(TNSOpenPanel.OCClass.openPanel);
LOpenDir.runModal;
LOpenDir.release;
I read in the Apple docs that with Sandbox the NSOpenPanel is derived from different classes, compared to the one without a sandbox. I guess this is the cause of the problem.
Any ideas would be greatly appreciated. We can't really publish an app that has to work with files without Open/Save dialogs :)
Btw, I tried several combinations of the Entitlements in Project Options, but they had no effect.