The issue was resolve by poster, but here's an example:
(this is based on an answer from: https://stackoverflow.com/a/58389937/3276518)
Mainly:
Access that can be set directly from Xcode
com.apple.security.files.downloads.read-only
and
com.apple.security.files.user-selected.read-only
Absolute path:
com.apple.security.temporary-exception.files.absolute-path.read-only
Home relative path:
com.apple.security.temporary-exception.files.home-relative-path.read-only
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.downloads.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.temporary-exception.files.absolute-path.read-only</key>
<array>
<string>/Users/<username>/Music/access.txt</string>
</array>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-only</key>
<array>
<string>/Desktop/access.txt</string>
</array>
</dict>
</plist>
The Documents
folder is not the main folder of the user. In Sandbox context, there's a Documents
folder in the container.