nsurl - 当前安全范围书签的内核资源限制是多少?

标签 nsurl appstore-sandbox security-scoped-bookmarks

-[NSURL startAccessingSecurityScopedResource] 状态的文档:

You must balance every call to the startAccessingSecurityScopedResource method with a corresponding call to the stopAccessingSecurityScopedResource method. If you fail to relinquish your access when you no longer need a file-system resource, your app leaks kernel resources. If sufficient kernel resources are leaked, your app loses its ability to add file-system locations to its sandbox, such as via Powerbox or security-scoped bookmarks, until relaunched.

有人能解释一下内核资源的实际限制吗?

我不想让我的应用程序达到这些确切的限制,只是知道一个大概的数字会很有帮助,这样我就可以判断代码是否做过任何危险/愚蠢的事情。

最佳答案

大概数字在 1000 到 2500 之间。我在苹果开发者论坛上读到了最近的三篇讨论。如果您是 Apple 的注册开发人员,您可以在这里找到它:

关于nsurl - 当前安全范围书签的内核资源限制是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16225311/

相关文章:

cocoa - Yosemite 中外部驱动器的 NSURL 书签解析失败

swift - 安全范围书签 - 书签已解析但仍无法访问文件

ios - NSTemporaryDirectory 子目录

objective-c - 在哪里提供 NSURL 值?

ios - Swift - Segue 未传递正确的数据

iphone - NSURLConnection 不下载名称中带有空格的文件

objective-c - 帮助应用程序沙箱和安全范围书签

ios - 可以在企业团队和标准团队之间共享iOS应用程序组吗?