mercredi 29 juillet 2015

large data tables and assets in iOS [Swift]

How to handle big data tables on iOS [Swift]?

I have got a table with about 3000 entries. Each of them is a text with additional columns for headline subline etc. as well optional columns for audio file, or image names.

You already guessed it. The user should be able to query through the entries and get the full data on a detail View. At first i thought CoreData was made for such tasks but then i learned, that it is not. You can only provide a schema bot not actual data, right?

In Fact the planned app does not add anything to the tables or delete anything, but has plenty of information and assets to show.

To try things out I did it with a plist and a manager class that returns an array of structs to populate a tableView. This worked fine, the list only had 10 entries though. I have the feeling that this is not right. Especially when i think about the actual table with it´s 3000 entries.

I have heard that some people populate a CoreData model with a local plist or json at the first start of an app. I also found some libraries that handle sqlite Databases. The last point confuses me because I always thought this is what CoreData does.

Further down the road lurks another question. How to deal with massive asset-catalogues. Of course many apps do not need to have many local resources, games excludes, so i do not really know if just dumping maybe hundreds of pictures and audio-files into asset-folders is adequate.

I just want to ask before taking the wrong path without knowing it.

Aucun commentaire:

Enregistrer un commentaire