Core Data not returning a custom concrete class

Ever had a problem when you’re fetching something from an NSManagedObjectContext, and you’ve set a concrete class in your model, only to find that it is an NSManagedObject? Me too. I read this post at StackOverflow, which suggested that you have to create the subclass using Xcode, from within the modeler. OK, I thought. I’ll try that. I deleted my old .h and .m files. I went into the modeler. I created a new Managed Object class. Read post »

Temporary NSManagedObjectIDs

I’ve run into a problem where I insert a managed object into a managed object context, in a separate thread, and then return the object ID to the main thread and then retrieve the object from the main thread’s context using that ID. It didn’t always work. It is because I saved the first managed object context after I took the object ID. And the object ID was temporary because the object hadn’t been persisted. And Read post »

binding not implemented for this SQLType 7: Core Data and iPhone OS 3

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'binding not implemented for this SQLType 7' That’s not something you want to read. And it doesn’t make much sense. And there’s not a lot out there on that problem, either. I am adding Core Data to Zoopcast (the people-powered local search app). The first few releases just took data from the JSON web service, and put it into unmanaged objects. (As it turns out, I probably should have Read post »

Images showing on iPhone Simulator but not device?

If you’re working on an app (Zoopcast, say) and you’re finding that images that you’ve got in your application bundle are showing up when you’re running in the simulator, but not on the device, check the case of your filenames. I thought there might have been some sort of image format problem that [UIImage imageNamed:] uses, but I was wrong. It was simple case sensitivity. I’m guessing that my computer has a case-insensitive filesystem whereas Read post »

CLLocationCoordinate2DMake is new in iOS 4

I hadn’t done any Core Location work before iOS 4 came out. But now I am. And I ran into a very odd EXCBADACCESS bug when running on an iPod touch that’s running iPhone OS 3.1.3. I pinpointed the problem (actually, I think it was only a problem, because I did a lot of other refactoring to get to this point) was with CLLocationCoordinate2DMake. And I finally realised when looking in the header that it’s Read post »