본문 바로가기
IOS

[Error] Compiling for iOS 8.0, but module 'RxTest' has a minimum deployment target of iOS 9.0

by eigen96 2023. 3. 7.
728x90

https://stackoverflow.com/questions/66766825/compiling-for-ios-9-0-but-module-bsgridcollectionviewlayout-has-a-minimum-dep

 

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

 

https://stackoverflow.com/questions/63967156/xcode-12-compiling-for-ios-10-0-but-module-rxswift-has-a-minimum-deployment

 

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를 통해 각 프로젝트의 빌드 설정에 대해서도 위와 동일한 작업을 수행합니다.

이러한 설정을 통해 프로젝트의 전체 배포 대상을 한번에 설정할 수 있다고 합니다.

 

728x90

댓글