library 和 applicationSupport 目录有什么区别?

What's the difference between the library and applicationSupport directories?

xcode 9.2 ; swift 4

我想以 属性 列表的形式为我的 ios 应用保留一些数据。我不想使用沙箱的文档目录,因为用户可以操纵它。我有两个选择:库目录和 applicationSupport 目录。使用一个或另一个有优势吗? 提前致谢

I have two alternatives: the library directory and the applicationSupport directory. Is there an advantage in using one or the other?

是的,Apple 推荐您使用 Application Support

虽然沙盒应用程序有自己的私有小文件系统层次结构,但您仍然需要遵循这些准则,就好像沙盒不存在一样。

请记住,无论您将数据 "user can manipulate it" 存储在何处,将其隐藏在沙箱中都不会阻止它。

HTH