본문 바로가기
App Dev/IOS

[xcode] deployment target 오류 해결하기

by hyen_ 2022. 10. 28.
300x250

flutter 프로젝트를 시뮬레이터 15.4버전 iphone 으로 돌려보려는데 도저히 run이 안됩니다.

 

현 상태는 podfile 상단이 분명히 12.0으로 선언되어있고, xcode 메인에도 min target 12.0으로 선언되어있는 상태인데 계속 run이 아래 오류때문에 안됩니다.

아래 오류를 해결하는 방법을 찾았습니다!

 

+ 방법1이 안되면 방법2로 시도해보세요!(2022-11-03 추가)


방법1

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 9.0 to ~~~

 

1) xcode열기

 

 

2) TARGETS > General탭 클릭 > 오른쪽에  Project Document를 열어서  Project Format을 XCODE 12.0-Compatible로 수정하기

Project Format은 Inspertors를 열어야 보입니다.

xcode 상단 오른쪽에  창버튼을 누르면 열립니다.

 

이렇게 수정되어야합니다.

 

그리고 추가로 버전을 바꿔야하는부분을 추가해봅니다(2024-10-24)

 

 

xcode 화면의 왼쪽상단에 닫기 아래에 있는 파란색 폴더 아이콘을 누른 후> pods 를 누르면 나타나는 Project와 targets에 있는

iOS Deployment Target들을 모두 12로 바꾸었습니다.

 

 

 

3) xcode닫고 터미널에 프로젝트파일에 포커스 두고  flutter clean

 

 

4) pubspec.yaml 파일에서  pub get 누르고 다시 빌드하면 성공!

 


방법2

 

1) podfile에 아래 내용으로 수정하세요. 저는 12로 타겟팅 해야해서 12.0이라고 작성했습니다.

12.0 부분에 원하는 타겟팅 버전을 작성하세요.

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

 

 

 

2) xcode닫고 터미널에 

(만약 프로젝트명> ios폴더 이렇게 포커싱 되어있다면 cd ..  명령어 입력하여 프로젝트 파일 이름으로 뒤로가셔서야합니다.)

프로젝트파일 이름에 포커싱 되어있는 상태에서 flutter clean

 

cd ios 

pod update

이렇게 ios에 포커싱 되어있는 상태에서 pod update 하고 아카이브 빌드하여 성공했습니다.

 


위 방법도 안되시는 분들 여기 봐주세요!

다른 프로젝트에서 위와 동일한 오류가 나서 ios파일 삭제하고 다시 pod파일 셋팅했더니 됩니다..

2022/12/16 드디어 확실한 오류해결을 하고 아래 추가 포스팅을 올렸습니다 ㅠㅠ

 

 

[Flutter] 'Flutter/Flutter.h' file not found 오류 그만뜨게하기...

증상1 warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 9.0 to ~~~ 증상2 'Flutter/Flutter.h' file not found 오류는 총 2가지가 계속 반복되고,

leehyen.tistory.com


참고사이트

Flutter - The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0 && Build input file cannot be found GoogleService-Info.plist - Stack Overflow

 

Flutter - The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0 && Build input file cannot be found Goo

I cannot build a Flutter app on iOS simulator. I am getting this error over and over. My flutter-doctor is clean. Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Xcode ...

stackoverflow.com

 

300x250
반응형

댓글