[Xcode] Xcode Error: abort trap 6

갑자기 개발 잘하다가 Xcode에서 처음 보는 에러가 발생하였다

코드에는 빨간줄 하나도 없는 상태에서 Abort Trap: 6 라니..

 

StackOverFlow에서 해답을 찾을 수 있었다

guard let 구문을 사용할 때 

let exampleText: String?
        
guard let exampleText = exampleText else { return }

위의 코드처럼 양쪽의 변수 이름을 같게 설정해 둔 것이 있었는데 이것을 다르게 수정해주니 에러가 해결되었다.. ^^

이런 식으로 코드 짠 적 많은데 처음 마주친 에러였다

 

모두 guard let 변수명 수정해보세요~.. 

 


@미닛메이드

 

참고

 

Command failed due to signal: Abort trap: 6

Since Xcode 7 and Swift 2.0, I get the error above, like in the screenshot shown here: I have no idea where this is coming from, cleaning and deleting derived data didn't work. Anyone else experi...

stackoverflow.com