views:

162

answers:

4

I have a simple Core Data application, with a table view and a drill down view. When I build and run in the simulator, all of the data in my database loads and the table view/drill down views function properly.

When I build and deploy to a device, my application only loads a small subset of the data (a few sections, A - C). I have no warnings nor build errors. Has anyone run into this problem? Any suggestions?

A: 

The problem is with the device as sometimes it does not load the entire data. The solution would be checking on the limitation of data.

This is a really vague answer. Care to clarify?
St3fan
I mean to say that the check your device whether it is limiting the data to be loaded. sometime we think of a very big issue and it would end up being a semi colon missing in our code.
A: 

I think what @theband might be talking about is the fetchLimit property of NSFetchRequest (and it's corresponding property fetchOffset). With these you can have more control over the fetching, and if you have a considerable amount of data, you will need to do that since you can't really plan on having more than about 8MB of RAM for your app on most devices.

slf
+2  A: 

While I have not run into that issue, I would debug this using log statements. Put in logs through your loop, at the end of the NSURLConnection (assuming you are getting the data from the net) and see what is coming down, etc.

There is no reason for the default to be limiting the data and contrary to some other advice, you have at least 20mb of RAM to use even on the first device. Plenty of room to load a ton of data. Spit out the data stream to the console from the phone and see what you are getting. That is where I would look first.

Marcus S. Zarra
A: 

Did you ever find an answer here?. I am having the exact same problem.

Wilmer