4

我需要从应用程序和应用程序扩展访问数据(照片、数据库...)。

但是应用程序无法访问应用程序扩展文档文件夹。我已经在共享应用程序组文件夹中搜索并存储数据,而不是将其保存在文档字典中是解决方案。

/Users/*/Library/Developer/CoreSimulator/Devices/8B1DB861-AA3F-446F-A559-D4727CDB9285/data/Containers/Shared/AppGroup/4849394B-CD33-4A85-9C6F-70573B615D6C

但是,它安全吗?在我之前的问题中,我询问了保存数据的位置:iOS 中不同位置的存储数据库有什么不同?

The main difference is that storing the file in the documents folder means you can write (update) it, which is pretty important for a database file. You cannot write to a file in the app bundle.

那么,将数据存储在共享应用组中将允许我在将应用上传到应用商店后更新、删除文件吗?

将数据存储在文档目录和应用组目录有什么不同?

4

0 回答 0