Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timeout when showing NSSavePanel

When showing an NSSavePanel while the app is in background I get the following error:

RVS:__54-[NSRemoteSavePanel _runOrderingOperationWithContext:]_block_invoke_0319 : Timeout occured while waiting for the window
Remote Window Controller requested NSRequestRetryActivateSharedwindow...

Also, the panel doesn't appear and runModal returns NSFileHandlingPanelCancelButton.

The app is sandboxed. This is the code that creates the panel:

NSSavePanel *panel = [NSSavePanel savePanel];
NSInteger result = [panel runModal];
if (result == NSFileHandlingPanelOKButton)
{
    // Do something
}

What might be the problem?

If the app is in the foreground the panel is shown without any error.

like image 253
hpique Avatar asked Dec 27 '12 19:12

hpique


2 Answers

Be sure to enable the appropriate entitlements. In this case, check that "User Selected File" is not set to "No Access".

like image 95
Chris Avatar answered Nov 15 '22 00:11

Chris


For the "User selected file" entitlement of the Entitlement section from Summary tab of target setting should be set to "Read/Write" access.

like image 45
Ajay Avatar answered Nov 14 '22 23:11

Ajay