pod install 런타임에 `target overrides the OTHER_SWIFT_FLAGS build setting defined`가 표시되고 추가 된 라이브러리를로드 할 수 없습니다.
환경
Xcode Version 12.4
MacOS BigSur 11.2.1
발생한 문제
프로젝트의 Podfile에 SnapKit을 추가하고
pod install
를 실행하면,Cannot load underlying module for ‘SnapKit'
문제가 발생했습니다.추가한 라이브러리의 임포트는 할 수 있지만 로드가 되어 있지 않은 모습.
$ pod install
Analyzing dependencies
Downloading dependencies
Installing SnapKit (5.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 12 dependencies from the Podfile and 22 total pods installed.
[!] The `MySampleApp [Debug]` target overrides the `OTHER_SWIFT_FLAGS` build setting defined in `Pods/Target Support Files/Pods-MySampleApp/Pods-MySampleApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
해결 방법
[!]
의 안내대로 대상 설정에 $(inherited)
를 추가한다.절차
xcodeproj → TARGETS → Build Settings → 오른쪽 상단의 검색창에서 other_swift라든지 검색하면 아래와 같은 항목이 나온다.
※ 특별히 설정하지 않은 경우는 화상과 달리 공란이 되어 있을 것
대상 체계의 우측의 란을 더블 클릭하면 아래와 같은 화면이 열리므로,
+
아이콘을 클릭하여 $(inherited)
를 항목에 추가이것으로 설정이 완료되었습니다.
다시
pod install
그러면 메시지가 사라지고 라이브러리가로드 될 수 있습니다.설명
설정 파일의 내용을 상속(
inherited
) 해 덧쓰기해 갈 필요가 있다고 합니다만,이번 경우는 그 계승 관계가 도중에 끊어져 있었기 때문에, 정상적으로 반영할 수 없었던 것 같습니다.
참고 : XCode의 Build Settings에서 값이 결정되는 규칙 - Qiita
Reference
이 문제에 관하여(pod install 런타임에 `target overrides the OTHER_SWIFT_FLAGS build setting defined`가 표시되고 추가 된 라이브러리를로드 할 수 없습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/naginx/items/9641c506a0887b314d97텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)