Security-scoped bookmarks partly working

I am trying to allow users of a MAS app the ability to choose a file and save it as an SSB. I can achieve this using MBS or Jim’s project at I can choose a flat text file or image file, but if I choose an app bundle, the SSB is not resolved after relaunching.

The entitlements look correct, I’ve sandboxed the test app and, as I say, it works fine for most files - just not .apps. Any ideas?

I too use Jim’s SSBs. But I do not use SSB for apps. I just save their name or bundle, and next time, I use NSWorkspace to see if they are installed, and then launch them. MAS did not complain.
But maybe you are after something different.

I use Sams Sandbox Kit and that works always fine.

If you read the thread, someone else was complaining that his code doesn’t work with folders (which is what application bundles are). Depending on what you’re doing with the application, Carlo’s suggestion might be enough (read the bundleID from the application) and use NSWorkspace to recreate the URL. You will never have full access to the contents of the application, but you can still launch it and perhaps perform other NSWorkspace functions.