I read other posts that come up with solutions to this question. However, their solutions require hacky code to be added to my application in order to be able to test it. To
Wrap the execution into a dispatch_group and then wait for the group to finish executing all dispatched blocks via dispatch_group_wait().
dispatch_group
dispatch_group_wait()