How to return the new object saved in coredata if I am using performBlock to save a managedObjectContext?
performBlock
The requirement is, add an entry in coredata,
I did some research and found that was not too difficult to fix this issue:
I replaced performBlock with performBlockAndWait and it worked.
performBlockAndWait
Reason is straightforward: performBlock is asynchronous, while performBlockAndWait is synchronous.