我正在为我的应用程序的沙箱创建权利 key 。我的权利 key com.apple.security.temporary-exception.sbpl
存在一些问题。我需要添加到此键中的五个异常(exception)是:ipc-posix-sem、file-issue-extension、mach-lookup >、文件写入创建
和文件读取数据
。因为我是在 Xcode 之外创建此应用程序(我使用的是 Python),所以我必须手动创建权利文件。我已经“成功”了,但 Apple 似乎不喜欢我的格式。
原代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.temporary-exception.sbpl</key>
<string>
(begin
(allow ipc-posix-sem)
(allow file-issue-extension)
(allow mach-lookup)
(allow file-write-create)
(allow file-read-data))
</string>
</dict>
</plist>
在因com.apple.security.temporary-exception.sbpl
被拒绝后,我做了以下修改:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.temporary-exception.sbpl</key>
<array>
<string>(allow ipc-posix-sem)</string>
<string>(allow file-issue-extension)</string>
<string>(allow mach-lookup)</string>
<string>(allow file-write-create)</string>
<string>(allow file-read-data)</string>
</array>
</dict>
</plist>
我的问题是:我的新格式是否是使用 .sbpl
权利的正确方法?在品尝了我的应用程序后,它可以与这个新的权利文件一起使用,现在我需要知道的是它是否为 Apple 所接受。
最佳答案
我发现了另一个沙盒权利 file in GitHub并且您的格式在我看来是正确的。
我认为另一个问题可能是您需要在“mach-lookup
”等命令之后提供参数。我正在看Apple Sandbox Guide unofficial documentation found here .
关于python - Apple Mac 应用商店的应用沙箱问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33513608/