The problem you are having is that for objects to be properly stored in a dictionary and then serialized to disk they must be NSCoding compliant which NSManagedObjectID is not.
Fortunately there is another way. There is a method on an NSManagedObjectID called URIRepresentation
which will be you an identifier for a Core Data object and you can use that instead of storing the NSManagedObjectID. You can then turn that NSURL URIRepresentation back into an NSManagedObjectID like this example:
NSManagedObjectID *objectID = [context.persistentStoreCoordinator managedObjectIDForURIRepresentation:myObjectURI];