开发者

Sandboxing and directory listing

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜