What is the best way to store static data in an iOS app?

I have a large amount of data in the application that he needs to receive, but the application will never be changed. Currently, I use this data in other applications in JSON files and SQL databases, but none of them are very convenient for use in iOS.

I do not want to use CoreData, which provides a ton of unnecessary functionality and complexity.

Would it be a good idea to store data in a PropertyList file and build an accessor class? Are there any simple ways to enable SQLite without switching to a CoreData route?

+3
source share
4 answers

plist, . Plist , , , plist, , .

, , SQL. " " SQL , Core Data, SQL-- API. , . SQL , . SQL Core Data, Core Data , SQL.

. . , Core Data , SQL. SQL , .

, SQL C, SQL. , , Apple Platforms, Core Data , , .

+4

SQLite Core Data SQLite C API.

- , - SQLite. , .

+3

, , , . SQLite ( ) , . , ( ) (, , , ), , .

. (99) ( , , ..), , SQLite , , CoreData.

+3

""? ?

, JSON () plist , , , , . , , .

, , (NSDataReadingMapped a.k.a. NSMappedRead) . iOS (, .png, "other.artwork", ).

NSKeyedArchiver , NSCoding, plist, , .

+1

Source: https://habr.com/ru/post/1755276/


All Articles