IPHONES_DEVELOPMENT_TARGET 경고문 일괄 해결하기

Tags
trouble shooting
부가 설명
배포 최소 버전 관련 경고문인데, 라이브러리를 일일이 바꾸기 귀찮으므로 Podfile에 명시하여 해결

경고문

'The iOS Simulator deployment target 'IPHONES_DEVELOPMENT_TARGET' is set to 8.0~~~'
이렇게 현재 설정된 TARGET 버전이 라이브러리의 최소지원 버전보다 낮을 때 뜨는 경고문이다.

해결방법

단순 warning이므로 보통 무시하고 넘어가도 되지만, 한번씩 되게 거슬릴 때가 있다.
xcode를 열어서 라이브러리 별로 버전을 일일이 다 바꾸는 것은 필요이상으로 번거로우므로 Podfile을 통해 해결해보자.
ios 프로젝트의 Podfile 파일을 열고 post_install do |installer| 하단 부분을 아래와 같이 배포버전을 명시하면 된다.
보통 9.0 관련해서 경고가 많이 떠서 9.0으로 명시했더니, React 관련 기능이 10버전부터 사용가능하다는 에러가 다시 떴기 때문에 10으로 바꿨다.
post_install do |installer| flipper_post_install(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' end end end
또는 버전 값을 없애 아래와 같이 설정해도 된다:
post_install do |installer| flipper_post_install(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' end end end