React Native/Error

[React Native / IOS] 시뮬레이터 에러, The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99.

Juzero 2022. 1. 9. 00:43

1. 에러 상황

에러문을 읽어보면 타겟의 버전이 서로 안맞아서 그렇다고 합니다. 

 

모든 개발자의 랜선 스승님인 stackOverFlow에 역시나 같은 질문이 있네요!

https://stackoverflow.com/questions/54704207/the-ios-simulator-deployment-targets-is-set-to-7-0-but-the-range-of-supported-d

 

The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.

I'm getting this below warning message in my Xcode 10.1. The iOS Simulator deployment targets are set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.1...

stackoverflow.com

 

해결 방법은 위 링크를 참고했습니다. 

 

 

2. 해결 방법

ios/Podfile에 아래 코드를 추가해줍니다. 추가 위치는 이렇습니다. 

 

target 'project' do

...

<아래코드>

...

end

 

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
  end
 end
end

 

 

 

제 Podfile에 추가한 사진인데요! 저는 flipper 때문에 이미 post_install do가 있었습니다. 

 

저 빨강박스 부분에서 flipper_post_install(installer)만 빼면 위에 코드랑 똑같습니다. 아래처럼 추가해주시면 에러가 해결될거에요!