Even 10MB is too much in one gulp. And there's no reason to read in such large chunks anyway.
Frankly, if you need help with this, you need to get a basic education in programming before you tackle an iPhone app. It sounds like you are just copying an example, and expect us to write your code for you.
But I'll try to help you help yourself anyway. Do you think that initWithContents is the only way to read data from a file? iPhone has an extensive API (actually, several APIs...) for reading files. How about hitting the "Help" button in XCode and doing some exploring?
If that's too much, try the "Files" chapter in any iPhone development book. You do have one of those, don't you?
After you've done that, if there's something you don't understand, feel free to come back and ask.
|