Move the code that comes after the dispatch_sync()
Block into the completion Block for fetchRemindersMatchingPredicate:
. Waiting to do something until an asynchronous task is done is exactly what a completion Block is for.
Also, don't make dispatch_sync()
calls to the current queue. It is guaranteed to deadlock a serial queue, and has a high chance even when the queue is concurrent.