I am creating a new macOS application that requires access to files outside of the sandbox. It needs to be docked in a silent state and packaged using the Electron Builder application. I have configured the relevant permissions as com.apple.security.memory-exception.files.absolute path.read-only,
It can be accessed normally in the local version of mas dev. The configuration parameters are as follows:
<key>com.apple.security.temporary-exception.files.absolute-path.read-only</key>
<array>
<string>/Volumes/NO NAME/</string>
<string>/Volumes/NO NAME 1/</string>
<string>/Volumes/NO NAME 2/</string>
</array>
But during the review period of the app store, some people said it was not of legal value. The following is the original statement:
Your application is not properly sandboxed, or it contains one or more rights with invalid values. Before resubmitting the new binary file, please review the included rights and sandbox documentation and resolve this issue.
com.apple.security.temporary-exception.files.absolute-path.read-only True
If there is a com.apple.security.memory-exception.files.absolute path.read-only authorization, will the app store accept it? What do I need to do to access it?
Hi,
I am creating a new macOS application that requires access to files outside of the sandbox. It needs to be docked in a silent state and packaged using the Electron Builder application.
I think we need to reset this conversation and start with what you're actually trying to do with these paths.
My concern here is that hard coding volume paths like this:
<string>/Volumes/NO NAME/</string>
<string>/Volumes/NO NAME 1/</string>
<string>/Volumes/NO NAME 2/</string>
...is a very bad idea.
As far as the larger system is concerned, the mount directory name inside "/Volumes/" is basically an arbitrary string. On macOS, DiskArbitration (the daemon that auto-mounts volumes) HAPPENS to use a scheme that's basically "<volume name> + <number if required>", but nothing "requires" that particular scheme. iOS has replaced that scheme with a UUID value and it's also possible to directly mount (bypassing DiskArb) a volume at any path you want.
This is an area of the system where it's very easy to assume that the behavior you commonly see is how the system actually "works" and not simply an incidental default. The system intentionally provides separate metadata keys for:
NSURLVolumeNameKey-> The volume's actual name (for example, what you'd see in the Finder)
vs.
NSURLVolumeURLKey-> The location the volume happens to be mounted at.
...because they are in fact separate metadata objects that are unrelated to each other. Making ANY assumption about one of them based on the other is the kind of mistake that works fine in basic testing and then blows up later, often destroying customer data.
You need to rethink your approach here, not just in your App Store version but in any other app version you have.
-Kevin Elliott
DTS Engineer, CoreOS/Hardware