在iphone中存储数据的位置?

时间:2022-04-15 23:06:47

I'm doing an app which needs to store large data. Just like find out what is best way to do it. Where should i store it? in document folder? or in caches folder? or there a better way of storing large data? Thanks in advance.

我正在做一个需要存储大量数据的应用程序。就像找出最好的方法一样。我应该在哪里存放?在文件夹中?还是在缓存文件夹中?还是有更好的存储大数据的方法?提前致谢。

1 个解决方案

#1


8  

It depends on the structure and the type of your data. If you have a relational data structure then you may consider SQlite or CoreData, if you have an intensive Object-Oriented data, then you should consider Core Data. It also depends on your skills with SQL and ORM frameworks when CoreData is higher level and use SQLite.

这取决于数据的结构和类型。如果您有关系数据结构,那么您可以考虑SQlite或CoreData,如果您有一个密集的面向对象数据,那么您应该考虑核心数据。当CoreData处于更高级别并使用SQLite时,它还取决于您使用SQL和ORM框架的技能。

If your data is images, then you can store in /Library folder of your application. If your data is JSON-like format, then you can store in plist file (which can also be in /Library folder)

如果您的数据是图像,则可以存储在应用程序的/ Library文件夹中。如果您的数据是类似JSON的格式,那么您可以存储在plist文件中(也可以在/ Library文件夹中)

#1


8  

It depends on the structure and the type of your data. If you have a relational data structure then you may consider SQlite or CoreData, if you have an intensive Object-Oriented data, then you should consider Core Data. It also depends on your skills with SQL and ORM frameworks when CoreData is higher level and use SQLite.

这取决于数据的结构和类型。如果您有关系数据结构,那么您可以考虑SQlite或CoreData,如果您有一个密集的面向对象数据,那么您应该考虑核心数据。当CoreData处于更高级别并使用SQLite时,它还取决于您使用SQL和ORM框架的技能。

If your data is images, then you can store in /Library folder of your application. If your data is JSON-like format, then you can store in plist file (which can also be in /Library folder)

如果您的数据是图像,则可以存储在应用程序的/ Library文件夹中。如果您的数据是类似JSON的格式,那么您可以存储在plist文件中(也可以在/ Library文件夹中)