开发者

Sandboxing and directory listing

开发者 https://www.devze.com 2023-03-26 03:04 出处:网络
A common task I do consists reading a directory content using NSFileManager:co开发者_如何转开发ntentsOfDirectoryAtPath but enabling sandboxing in Lion this becomes impossible.

A common task I do consists reading a directory content using NSFileManager:co开发者_如何转开发ntentsOfDirectoryAtPath but enabling sandboxing in Lion this becomes impossible.

I know user must choose from a NSOpenPanel the directory to make Sandbox happy (or dropping it) but how can I "inform" sandbox that I must read directory from a path previously stored in some configuration file without user interaction?

Currently I've set the following entitlement keys

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


The sandbox currently doesn't remember what's it allowed to access on the file system between application launches.

This is tracked at Apple at some high-priority radar but I still suggest that you file your own bug report as well, to raise its awareness even higher within Apple.

0

精彩评论

暂无评论...
验证码 换一张
取 消