모듈화시 각 모듈에서 사용하는 ThirdParty Library들의 효율적인 관리를 위해 ThirdPartyKit이라는 모듈로 분리하여 사용하였다.



App 테스트를 위해 Configurations를 각각 다르게 줘고 Scheme를 각각 설정하였다.
Dev, QA, Release Scheme이다




App-Release 스키마와 App-Dev 스키마는 정상적으로 실행되는데 App-QA 스키마는 아래와 같은 에러가 발생한다.
Framework 'ThirdPartyKit' not found
Linker command failed with exit code 1 (use -v to see invocation)
~/DerivedData/프로젝트이름/Build/Products의 폴더를 들어가 각각의 폴더를 확인해보면
QA에만 ThirdPartyKit.framework만 포함되어 있지 않고 있다.
하지만 ThirdPartyKit에 추가한 라이브러리들(SnapKit)은 다 포함되어있다




ThirdPartyKit.framework가 포함되지 않는 이유는 ThirdPartyKit의 Configurations와 App의 Configurations가 일치하지 않기 때문이다.




당연하게도 Configurations의 Name은 일치해야 하고

App에 Configurations을 추가할 경우 참조하고 있는 모든 framework의 Configurations를 App과 맞춰줘야 한다.
App에 AnotherFramework 추가
AnotherFramework에 QA Configurations를 추가하기 전 App Build Fail


AnotherFramework에 QA Configurations를 추가한 후 App Build Success

Example
https://github.com/junbok97/TIL/tree/main/Swift/%EB%B8%94%EB%A1%9C%EA%B7%B8/Framework-Configurations
TIL/Swift/블로그/Framework-Configurations at main · junbok97/TIL
Today I Learn. Contribute to junbok97/TIL development by creating an account on GitHub.
github.com