• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
coreData fetch ok in Sim but nil on device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: coreData fetch ok in Sim but nil on device
      • From: Nicolas Berloquin <email@hidden>
  • Prev by Date: Re: -[NSColor setBackgroundColor:] not working in 10.6
  • Next by Date: Re: Let the runloop process its queue during a long operation
  • Previous by thread: Re: init returns nil or raises exception?
  • Next by thread: Re: coreData fetch ok in Sim but nil on device
  • Index(es):
    • Date
    • Thread