daf*_*afi 4 macos cocoa sandbox nsfilemanager osx-lion
我做的一项常见任务是使用NSFileManager读取目录内容:contentsOfDirectoryAtPath但在Lion中启用沙盒这是不可能的.
我知道用户必须从NSOpenPanel中选择目录以使Sandbox满意(或放弃它)但是如何"通知"沙箱我必须从以前存储在某些配置文件中的路径读取目录而无需用户交互?
目前我已设置以下授权密钥
com.apple.security.files.user-selected.read-write
com.apple.security.documents.user-selected.read-write
com.apple.security.temporary-exception.files.absolute-path.read-write
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
749 次 |
| 最近记录: |