Took a guess and enabled sandbox and added read/write to user selected file and the hang went away. Is it true that I cannot make an unsandboxed app and uses the NSSavePanel? I know this is a data point of one, so I want to be careful what conclusions I draw… any thoughts?
No, I have a non-sandboxed app and it works fine. I think the problem is that you are using NSSavePanel:runModal. If you look in the doc'n, it says:
"This method invokes NSApplication's runModalForWindow ..."
If it's doing that, then you need to cancel the modal yourslef (as with any call of runModalForWindow). Try putting a
in your "else" clause.
However, it may be simpler to use a sheet modal:
if (result == NSFileHandlingPanelOKButton)
self.saveFileURL = [[panel URLs] objectAtIndex:0];
You can spin the writing to a file off to a separate thread if it takes a long time.
Hope this helps,