I got this error:
Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
How can I solve this? The code works normally,
mine was DispatchQueue.main.sync inside the closer I made it DispatchQueue.main.async and it worked.