安全范围书签的当前内核资源限制是什么? [英] What are the current kernel resource limits on security-scoped bookmarks?

查看:47
本文介绍了安全范围书签的当前内核资源限制是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-[NSURL startAccessingSecurityScopedResource] 状态的文档:

您必须平衡对 startAccessingSecurityScopedResource 方法的每次调用与对 stopAccessingSecurityScopedResource 方法的相应调用.如果您在不再需要文件系统资源时放弃访问权限,则您的应用程序会泄漏内核资源.如果泄漏了足够的内核资源,您的应用将无法将文件系统位置添加到沙箱,例如通过 Powerbox 或安全范围的书签,直到重新启动.

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.

谁能解释一下内核资源的实际限制是多少?

Can anybody shed any light on what the limit on kernel resources actual is?

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

I don't wish to make my app reach these exact limits, just that it would be helpful to know a ballpark figure so I can judge if code is ever doing anything dangerous/stupid.

推荐答案

Ballpark 数字在 1000 到 2500 之间.我在 Apple 的开发者论坛上阅读了最近的三个讨论.如果您是 Apple 的注册开发者,您可以在这里找到它:

Ballpark figure is between 1000 and 2500. I read three recent discussions in the Developer Forums at apple. If you are a registered developer at apple you may find it here:

这篇关于安全范围书签的当前内核资源限制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆