Same issue for us in Hungary, in multiple development teams, build machines etc., but interestingly, not all of the developer machines.
Post
Replies
Boosts
Views
Activity
See also https://developer.apple.com/forums/thread/654993
See also https://developer.apple.com/forums/thread/654794
Experiencing this in Hungary again, too. As before, not on every machine.
Here's what helped in my case.
What I was trying to do:
Insert a file url into NSDocumentController's recent document list programmatically. It was originally opened by NSOpenPanel on an earlier run but then its path was saved to a file for opening later. My application manages the recent list manually based on its own records.
What happened:
It appeared in the File menu recent list, but Clear Menu remained grayed out.
I got the "Insert failed for list identifier com.apple.LSSharedFileList.ApplicationRecentDocuments" error message
What caused this:
The application was not permitted to access the file that I was trying to insert into the recent list.
What fixed the problem:
I had to read in the bookmark that I saved on the earlier run, and call startAccessingSecurityScopedResource on it, before inserting it into the recent list.
Even after inserting into the list, the app should not call stopAccessingSecurityScopedResource, until the item is removed from the recent list.