Xcode 14.3 (14E222b)
기존 엑스코드 버전에서는 문제가 되지 않지만 새롭게 변경된 Xcode에서 빌드를 하면 코코아 팟 에러가 발생합니다. 다음과 같이 libarclite_iphoneos.a 파일을 찾을 수 없다고 하며 앱을 빌드할 수 없는데 이럴 때는 코코아 팟에 빌드 타깃을 변경해주어야 합니다.
File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
플러터(Flutter) 개발에서도 이와 같은 버그가 많이 생기는 것 같고 이 때 역시 빌드 타깃을 변경해주면 해결되는 것 같습니다.
우선 다음과 같이 PodFile 에 맨 아래에 코드를 추가해줍니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install do |installer| | |
installer.generated_projects.each do |project| | |
project.targets.each do |target| | |
target.build_configurations.each do |config| | |
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' | |
end | |
end | |
end | |
end |
Pod Install 을 하기 전에 다음과 같이 기존의 캐쉬를 한 번 날려줍니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo gem install cocoapods-deintegrate cocoapods-clean | |
$ pod deintegrate | |
$ pod cache clean --all | |
$ rm Podfile |
혹시 몰라서 Xcode를 다운그레이드 해서 작업하니 잘 되었습니다. 하지만 최신 Xcode에서 사용하려면 PodFile에 옵셔을 추가해주면 됩니다.
'개발툴 > Xcode' 카테고리의 다른 글
[Xcode] SwiftUI 다크모드 제거 무시하기 (disabled) (0) | 2024.02.14 |
---|---|
[Xcode] 다국어 테스트 Localization 시스템 스키마 언어 설정 (0) | 2023.05.24 |
[Xcode] applicationWillTerminate 이 정상적이지 않을 때 Info.plist 옵션 (0) | 2023.04.24 |
[Xcode] Cocoapods m1 맥에서 Homebrew로 설치하기 (0) | 2023.04.18 |
[Xcode] 오래된 Xcode에서 지원하지 않는 디바이스 빌드하기 (0) | 2023.04.15 |