Why dispatch to the main thread, then dispatch to the main thread again? I think your intent here is to show a loading indicator, but this will just block the main thread anyway.