I’m using restkit trying to serialize an object after I do a PUT request, and I’m getting the following error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot look up mapping matching nil pattern string.'
How can I fix this?
My serialization mapping is just an inverse mapping of the object mapping, and I know the object mapping works fine.
I was modifying the loader’s URL in the block of
putObject:usingBlock:and I replaced it with a NSURL, not a RKURL like restkit was expecting.It probably tried to assign the variable
resourcePathbased upon a property that RKURL has and NSURL lacks.resourcePathwas then used as the pattern string, and was of course nil.I’m still able to modify the loader’s URL, but now that I assign it a RKURL everything works.