Compiling for iOS 9.0, but module 'BSGridCollectionViewLayout' has a minimum deployment target of iOS 10.0
I'm trying to build flutter app on IOS and i get this error: Compiling for iOS 9.0, but module 'BSGridCollectionViewLayout' has a minimum deployment target of iOS 10.0 Tried: Xcode 12: Compiling fo...
stackoverflow.com
Xcode 12: Compiling for iOS 10.0, but module 'RxSwift' has a minimum deployment target of iOS 12.0
I just updated Xcode to the latest version, and the project is no longer compiling. I removed everything and tried to rebuild pods but ended up having the same issue this issue: [x] /Users/alouane...
stackoverflow.com

??? 이미 13.0 이상인데...?

아래 코드 내용을 podfile에 추가해주었더니 테스트가 성공하는 것을 확인 할 수 있었습니다.
deployment_target = '14.0'
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'] = deployment_target
end
end
project.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
end
end
end
위 코드는 Cocoapods를 사용하는 iOS 프로젝트에서 배포 대상(deployment target)을 지정하는 방법 중 하나입니다.
post_install 블록은 Cocoapods에서 제공하는 훅(hook) 중 하나로, Podfile에서 모든 pod 라이브러리가 설치된 후 실행됩니다. 이 블록 내에서는 각 프로젝트와 타겟의 빌드 설정을 변경하여 배포 대상을 변경합니다.
installer.generated_projects를 통해 모든 프로젝트에 접근하고, 각각의 프로젝트의 모든 타겟을 반복하며, 각각의 빌드 설정에서 IPHONEOS_DEPLOYMENT_TARGET를 deployment_target으로 설정합니다. 이를 통해 Cocoapods가 설치한 라이브러리의 배포 대상이 전체 프로젝트에서 일괄적으로 설정됩니다.
또한, project.build_configurations.each를 통해 각 프로젝트의 빌드 설정에 대해서도 위와 동일한 작업을 수행합니다.
이러한 설정을 통해 프로젝트의 전체 배포 대상을 한번에 설정할 수 있다고 합니다.
'IOS' 카테고리의 다른 글
Observer 패턴 vs Publisher/Subscriber 패턴 (1) (0) | 2023.11.07 |
---|---|
[iOS] Compositional Layout & Sticky Header를 적용하면서(UIKit) (0) | 2023.03.10 |
[iOS] Swinject를 적용해보면서... - 의존성 주입 Dependency Injection, Inversion (1) | 2023.01.15 |
[iOS] Swift retain Cycle 순환참조, weak, strong, unowned (0) | 2023.01.12 |
[iOS] CoreData로 꼼꼬미 단어장 앱 만들기 (0) | 2022.12.23 |
댓글