Question

I am trying to seed a database using RKManagedObjectSeeder.

I believe I had set all the needed code, and I am trying to generate the DataBase using the "Generate Seed Database" Target.
All the json files are added to the "Generate Seed Database" target (I checked in the target compile source and the JSON files are there).

When I run the simulator I get this error:

2011-12-25 19:49:39.334 English Club copy[982:12803] * Assertion failure in BOOL RKObjectIsValueEqualToValue(id, id)(), /Users/shannoga/github/shannoga-English-Club/RestKit/Code/ObjectMapping/RKObjectMappingOperation.m:37 2011-12-25 19:49:39.337 English Club copy[982:12803] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected sourceValue not to be nil'

I know that it comes from this line:

[seeder seedObjectsFromFiles:@"stories.json",nil];

What could be the problem?

IS there anybody here that can help me?

Was it helpful?

Solution

I had similar errors with RESTKit and found it to be that my JSON structure was invalid.

This may (or may not), be your issue but try running your JSON text through something like 'JSON Validator', or 'Visual JSON' to see - Both of which are available for free download on the Mac AppStore (I presume your using a Mac). ;o)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top