Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A couple of thoughts:</p> <ol> <li><p>Apple's recommended framework is Core Data. Especially if you have a lot of data, it's probably worth familiarizing yourself with it. </p></li> <li><p>Direct SQLite programming can have its advantages, but unless you have a compelling reason to pursue it (and I don't see anything suggesting this in your question), stick with Core Data. If you do decide to use SQLite, consider using the <a href="https://github.com/ccgus/fmdb" rel="nofollow">FMDB</a> Objective-C wrapper for SQLite.</p></li> <li><p>If you're dealing with a trivial amount of data (e.g. a dozen records), Core Data is probably overkill and you could just use a property list (plist). For example, if you have downloaded your JSON into a <code>NSArray</code> or <code>NSDictionary</code>, you can then just do <code>writeToFile</code> to save it, and <code>dictionaryWithContentsOFFile</code> or <code>arrayWithContentsOfFile</code> to read it back at a future date.</p></li> <li><p>JSON is generally considered more of a mechanism for exchanging data with a server. I wouldn't be inclined to store data locally in JSON format (though you could). I'd use a plist instead.</p></li> <li><p>By the way, it's generally not advised to store the images themselves in your CoreData/SQLite database. If you have larger files, for performance reasons, we often store them in the iOS <a href="http://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW12" rel="nofollow">File System</a> (and save some reference to the file name in the database).</p></li> <li><p>You mention that you have seen apps that download the entire (latest version) of a database. A more sophisticated implementation (critical with larger databases) would entail downloading updates (edits, deletions, insertions) rather than the full database. For a small database, if you can get away with the solution you propose (and it certainly makes it easier), but as your app becomes more sophisticated, you will want to consider more elegant server integration.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload