Reply to Xcode error: Abort Trap 6 In my case, I solved it by changing guard else return to if let block of code in for-loop, and this for-loop is in network callback. In brief, I think the compiler doesn't know where to execute from it hit return in guard else. Hope it helps Programming Languages Swift Sep ’21