0

I'm working on a data-driven iOS app. I've finished a helper mac os app with core data&cocoa Bindings to prepare data to preload on the iOS app.

Suddenly on using the pre-loaded .sqldata file, I found empty objects. I was using NSArrayController's add/removeObjects methods in the helper app. I think the problem is that removeObjects doesn't really delete the objects from the database table.

Any help please to make sure it is deleted successfully from database, not only from the array controller?

Tahan
  • 77
  • 2
  • 12

2 Answers2

1

I'm working on a data-driven iOS app ... using NSArrayController's add/removeObjects methods.

NSArrayController does not exist on iOS, so you're going to have problems trying to use it. I'm guessing that you're working on the simulator at this point. That's convenient, but the simulator lets you get away with stuff that's not valid on a real device. If you're working on an iOS app, fixing problems with NSArrayController is a waste of time, and the best move would be to get rid of it as soon as possible.

Tom Harrington
  • 69,312
  • 10
  • 146
  • 170
  • NOOOO, I'am sorry. I use NSArrayController only on the mac os app (the helper app) sorry about this conflict, I'll edit the question to bo more clearer – Tahan Mar 18 '13 at 17:19
0

Ok, I solved the problem. The problem was that I deleted the object from the NSArrayController, but forgot to delete it first from the ManagedObjectContext.

Tahan
  • 77
  • 2
  • 12