1️⃣ error

아래 내용과 같이 다른 프로젝트의 동일 명의 파일과 선언이 중복되어 빌드 상에서 에러가 생기는 문제.

<unknown>:0: error: filename "MainController.swift" used twice: '/Users/myname/Desktop/ProjectName/ProjectName/Controllers/MainController.swift' and '/Users/myname/Desktop/ProjectName/ProjectName/Controllers/MainController.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

2️⃣ 해결 방법

프로젝트의 파일 및 모든 속성들이 선언되어 있는 project.pbxproj을 열어서 직접 필요한 파일 선언은 남겨두고, 중복된 선언만 지워주면 끝!

Finder에서는 project.pbxproj이 안보이기 때문에 xcodeproj 파일을 Visual Studio Code 를 이용하여 실행하면 접근할 수 있다.