My AppStore cocoa app includes a swift-based command-line utility which is sandboxed (appstore requirement). Now, I had (wrongly) assumed that any arguments given to `Swift.CommandLine.arguments' would be covered using the entitlement: com.apple.security.files.user-selected.read-write and appropriately be handled by the sandbox. After all, the user explicitely specifies the file-URL argument of the command-line utility and initiates the file-access.
Powerbox is using Cocoa invoked via NSOpenPanel and NSSavePanel, but what is the Foundation (command-line) equivalent?
Is there API to read file-URL's from the `Swift.CommandLine.arguments' ?
The reasons I ask is because I resorted to using the entitlement 'com.apple.security.temporary-exception.files.home-relative-path.read-only' (as advised in the Apple docs) but got rejected in review. So, that implies there must be an official way of accessing the user-files from a command-line utility (or is Apple saying that users are not allowed to access there own files using command-line utilties?).
Am I missing something? If not, I will file a bug-report. Users should be able to specify file-URL's on the command-line that work directly with Powerbox.