I managed to resolve this by changing the nsmanagedobject parameter to a standard nsobject.
There must have been an issue with the context I was using.