coreData fetch ok in Sim but nil on device
coreData fetch ok in Sim but nil on device
- Subject: coreData fetch ok in Sim but nil on device
- From: Nicolas Berloquin <email@hidden>
- Date: Thu, 7 Oct 2010 11:44:42 +0200
Hi !
I'm having this weird behavior with coreData managedObjects.
I have a very simple entity that I show in a UITableView, and store with
coreData.
When I run my app on the Simulator, everything works as expected,
load/save/delete.
And when I quit and relaunch the app, all is ok.
But when I run the exact same code on my iPhone 4 (4.1 sdk), I can make the
edits/add/delete
inside the app, and the tableView reflects the changes. But when I quit and
relaunch the app,
all my rows are there, but all the values are nil.
I noticed that after doing the performFetch, the data is <fault> on the
device, and populated
on the Simulator. (even when I tried setting the request to
setReturnsObjectsAsFaults:NO).
But that shouldn't be a problem, once I access the values, right ?
I used @synthetise for my model properties. And I access them like this :
Names *myNames = [fetchedResultsController objectAtIndexPath:indexPath];
NSLog(@"titre=%@ qID=%d", myNames.titre, myNames.questionnaireID);
and get nil nil on the iPhone, and the correct values on the Simulator...
Would you have any suggestion as to what could be happening ?
thanks !
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden