Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>So what counts as a "very big file" anyway? At which point is it prudent to use delegation over the simple 'arrayWithContentsofCSVFile'?</p> </blockquote> <p>The way that <code>CHCSVParser</code> <em>reads and parses</em> your CSV file is identical regardless of whether you're using the <code>NSArray</code> category method or directly interfacing with the delegate itself (you can see this for yourself <a href="https://github.com/davedelong/CHCSVParser/blob/master/CHCSVParser/CHCSVParser.m#L736" rel="nofollow">here</a>). So "a very big file" is really a CSV file which would be too large to hold in memory as an <code>NSArray</code> in its entirety. The memory consumption will depend both on the number of columns and the number of rows, so it's hard to give a definite limit. </p> <p>What this means is that the problems you get from using the <code>-arrayWithContentsOfCSV</code> with large files shouldn't manifest themselves as returning nil, but as low memory warnings and the like. The fact you're getting <code>nil</code> returned suggests something else is going on.</p> <p>Firstly, you say you've tried logging the file, so you know it exists - have you tried parsing a much smaller subset of that file? The problem might be that your CSV is badly formed. Or alternatively - and this is something I've had problems with myself when working with CSV on iOS - is your CSV encoded correctly? Sometimes if you're outputting directly from Excel you can end up with strange and weird text encodings that occasionally seem to break things.</p> <p>You can always breakpoint and step-through the parsing methods in <code>CHCSVParser</code> for yourself and see what's going on. I hope this is of some use to you. As you've discovered, Dave DeLong actually posts here quite a bit - if you're lucky he'll probably come along and share more wisdom than I can.</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. 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