이 세상에 하나는 남기고 가자

이 세상에 하나는 남기고 가자

세상에 필요한 소스코드 한줄 남기고 가자

target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting 오류 해결

유영재

Xcode 8에서 cocoapods 사용시 아래와 같은 오류가 발생하는 경우가 있다.

[!] The `xproject [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-xproject/Pods-xproject.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `xproject [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-xproject/Pods-xproject.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

최근 Xcode와 cocoapods를 업데이트하고 위와 같은 오류가 발생해서 찾아보니 Errors after updating to Xcode 8: "No such module" and "target overrides the EMBEDDED_CONTENT_CONTAINS_SWIFTbuild setting" 에서 해결 방법을 설명하고 있었다.

Project/Targets -> [Project Name] -> Build Settings -> "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES" 를 "$(inherited)"로 변경하는 것으로 위 문제는 간단히 해결된다.

target-overrides-the-always-embed-swift-standard-libraries-build-setting-1

Xcode 8 Release Notes 주요 내용 정리를 보면 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES에 대해 다음과 같이 설명하고 있다.

EMBEDDED_CONTENT_CONTAINS_SWIFT는 없어지고 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES가 추가되었다. 이 새로운 설정은 Xcode에서 항상 Swift Standard Libearies를 채워넣도록 지정하는 것이다. 대상에 직접 사용하거나 덧붙여 다른 제품이 Swift를 사용하는 경우에만 이 설정을 사용할 수 있다.

comments powered by Disqus